1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-17 21:18:31 +02:00

fix crash when double quotes in filename #1433

This commit is contained in:
Ryooooooga 2021-08-13 21:39:38 +09:00
parent a2ee52142c
commit 488c43aaa2
No known key found for this signature in database
GPG Key ID: 07CF200DFCC20C25

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, c.OSCommand.Quote(fileName))
}
// CheckoutFile checks out the file for the given commit