diff options
author | black_desk <clx814727823@gmail.com> | 2021-08-13 14:02:11 +0800 |
---|---|---|
committer | black_desk <clx814727823@gmail.com> | 2021-08-13 14:02:11 +0800 |
commit | d51b065f2a9cc6b6b0899b0bac3a1e80e04410ad (patch) | |
tree | 8111bff347c0aafc9a66c485c460d0efb28c6fff /pkg/commands/files.go | |
parent | a3a14e9ff47683c5d4e926ec5630935c8587c11c (diff) |
fix empty patch panel when spaces in filename
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 f4588aac5..157fa843b 100644 --- a/pkg/commands/files.go +++ b/pkg/commands/files.go @@ -250,7 +250,7 @@ func (c *GitCommand) ShowFileDiffCmdStr(from string, to string, reverse bool, fi reverseFlag = " -R " } - return fmt.Sprintf("git diff --submodule --no-ext-diff --no-renames --color=%s %s %s %s -- %s", colorArg, from, to, reverseFlag, fileName) + return fmt.Sprintf("git diff --submodule --no-ext-diff --no-renames --color=%s %s %s %s -- \"%s\"", colorArg, from, to, reverseFlag, fileName) } // CheckoutFile checks out the file for the given commit |