summaryrefslogtreecommitdiffstats
path: root/pkg/commands/files.go
diff options
context:
space:
mode:
authorRyooooooga <eial5q265e5@gmail.com>2021-08-13 21:49:40 +0900
committerRyooooooga <eial5q265e5@gmail.com>2021-08-13 21:49:40 +0900
commit37700908cc9c0267eb67c693f166f052ca12fd7f (patch)
tree27b05de1b8f9bc13dd47f399a4da3d6d348ed85d /pkg/commands/files.go
parent488c43aaa201822e3fc824b79d3a3026e3ab865c (diff)
fix checkout file command
Diffstat (limited to 'pkg/commands/files.go')
-rw-r--r--pkg/commands/files.go2
1 files changed, 1 insertions, 1 deletions
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