From 823b436b5388bd7321f14d22f7555dc974e61dad Mon Sep 17 00:00:00 2001 From: Giorgio Previtera Date: Sat, 13 Jul 2019 14:49:12 +0100 Subject: [PATCH] 477 Remove duplicate checkout We already checout the file calling `c.DiscardUnstagedFileChanges` --- pkg/commands/git.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 4e416310e..32382ba37 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -476,11 +476,6 @@ func (c *GitCommand) DiscardAllFileChanges(file *File) error { return err } } - if file.HasMergeConflicts || file.HasInlineMergeConflicts { - if err := c.OSCommand.RunCommand(fmt.Sprintf("git checkout -- %s", quotedFileName)); err != nil { - return err - } - } if !file.Tracked { return c.removeFile(file.Name)