Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Worktree.Checkout:Force bug? #435

@snail007

Description

@snail007

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions