mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Add convenience builder for git commands
This commit is contained in:
@ -267,5 +267,7 @@ func (self *PatchCommands) PullPatchIntoNewCommit(commits []*models.Commit, comm
|
||||
// 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.
|
||||
func (self *PatchCommands) diffHeadAgainstCommit(commit *models.Commit) (string, error) {
|
||||
return self.cmd.New(fmt.Sprintf("git diff HEAD..%s", commit.Sha)).RunWithOutput()
|
||||
cmdStr := NewGitCmd("diff").Arg("HEAD.." + commit.Sha).ToString()
|
||||
|
||||
return self.cmd.New(cmdStr).RunWithOutput()
|
||||
}
|
||||
|
Reference in New Issue
Block a user