1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-03 15:02:52 +02:00

fix empty patch panel when spaces in filename

This commit is contained in:
black_desk 2021-08-13 14:02:11 +08:00
parent a3a14e9ff4
commit d51b065f2a

View File

@ -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