diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2021-08-13 21:49:40 +0900 |
---|---|---|
committer | Ryooooooga <eial5q265e5@gmail.com> | 2021-08-13 21:49:40 +0900 |
commit | 37700908cc9c0267eb67c693f166f052ca12fd7f (patch) | |
tree | 27b05de1b8f9bc13dd47f399a4da3d6d348ed85d /pkg/commands/files.go | |
parent | 488c43aaa201822e3fc824b79d3a3026e3ab865c (diff) |
fix checkout file command
Diffstat (limited to 'pkg/commands/files.go')
-rw-r--r-- | pkg/commands/files.go | 2 |
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 |