-
Notifications
You must be signed in to change notification settings - Fork 534
Worktree.Checkout:Force bug? #435
Comments
I confirm the bug, force checkout doesn't work properly. How to reproduce it:
Expected: both I suspect it's due to the fact that https://github.com/src-d/go-git/blob/v4/worktree.go#L130 Actually, |
I'd be interested in functioning
I looked at the code in the So far, I've tested that the following scenarios don't work:
If you could provide some support in terms of guidance, I'd be interested in preparing a pull request to solve those issues. |
@skyflyer I am working in he fix since some days ago, will implement all the reset modes properly. Thanks |
1.I clone a test Repository to /Users/snail/codes/gotest (current branch is master)
2.I delete a file "/Users/snail/codes/gotest/index.php"
3.use git command,git checkout master -f
4. nothing error showed and index.php returned back,i hope so.
but if is use go-git do step 3 ,i got an error :remove /Users/snail/codes/gotest/index.php: no such file or directory
code snippet:
err = w.Checkout(&git.CheckoutOptions{
Branch: plumbing.ReferenceName("refs/heads/master"),
Force: true,
})
fmt.Println(err)
is it a bug? I confused .
The text was updated successfully, but these errors were encountered: