mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
Fix problems with patches if git diff
was customized with config.
This commit is contained in:
committed by
Stefan Haller
parent
a2ff2e6dd9
commit
afbaf82395
@ -321,7 +321,11 @@ func (self *PatchCommands) PullPatchIntoNewCommit(
|
|||||||
// only some lines of a range of adjacent added lines. To solve this, we
|
// only some lines of a range of adjacent added lines. To solve this, we
|
||||||
// get the diff of HEAD and the original commit and then apply that.
|
// get the diff of HEAD and the original commit and then apply that.
|
||||||
func (self *PatchCommands) diffHeadAgainstCommit(commit *models.Commit) (string, error) {
|
func (self *PatchCommands) diffHeadAgainstCommit(commit *models.Commit) (string, error) {
|
||||||
cmdArgs := NewGitCmd("diff").Arg("HEAD.." + commit.Sha).ToArgv()
|
cmdArgs := NewGitCmd("diff").
|
||||||
|
Config("diff.noprefix=false").
|
||||||
|
Arg("--no-ext-diff").
|
||||||
|
Arg("HEAD.." + commit.Sha).
|
||||||
|
ToArgv()
|
||||||
|
|
||||||
return self.cmd.New(cmdArgs).RunWithOutput()
|
return self.cmd.New(cmdArgs).RunWithOutput()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user