Fix discard logic

Missed a spot a couple PR's ago. We had an integration test which caught this but which was skipped due
to index.lock file issues. The test was also broken for other reasons due to it not having been running
for a while, so I've fixed that up too.
This commit is contained in:
Jesse Duffield 2023-05-23 19:58:09 +10:00
parent 63dc07fded
commit fb0931e1a1
2 changed files with 8 additions and 5 deletions

View file

@ -149,7 +149,7 @@ func (self *WorkingTreeCommands) DiscardAllFileChanges(file *models.File) error
if file.ShortStatus == "DU" {
return self.cmd.New(
NewGitCmd("rm").Arg("rm", "--", file.Name).ToArgv(),
NewGitCmd("rm").Arg("--", file.Name).ToArgv(),
).Run()
}