Open magicalcosmos opened 4 years ago
I think I just ran into the same issue. The problem is the implementation of Worktree.doAddDirectory: https://github.com/src-d/go-git/blob/master/worktree_status.go#L299
Add only iterates through files existing on the file system. It will therefore not stage any removed files.
I have come across the same problem, until this is fixed i have come up with the following ~dirty hack~ solution
cmd := exec.Command("git", "add", ".")
cmd.Dir = workTree.Filesystem.Root()
err = cmd.Run()
Its not pretty but it works
Hi there,
I removed files by os.RemoveAll and then add, but that's didn't work, the code as belows:
What's wrong with that code, any suggestions?