From 37700908cc9c0267eb67c693f166f052ca12fd7f Mon Sep 17 00:00:00 2001 From: Ryooooooga Date: Fri, 13 Aug 2021 21:49:40 +0900 Subject: [PATCH] fix checkout file command --- pkg/commands/files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/files.go b/pkg/commands/files.go index 99e9bcf5c..9fa5fb1bd 100644 --- a/pkg/commands/files.go +++ b/pkg/commands/files.go @@ -255,7 +255,7 @@ func (c *GitCommand) ShowFileDiffCmdStr(from string, to string, reverse bool, fi // CheckoutFile checks out the file for the given commit func (c *GitCommand) CheckoutFile(commitSha, fileName string) error { - return c.RunCommand("git checkout %s %s", commitSha, fileName) + return c.RunCommand("git checkout %s -- %s", commitSha, c.OSCommand.Quote(fileName)) } // DiscardOldFileChanges discards changes to a file from an old commit