mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 04:45:47 +02:00
Add convenience builder for git commands
This commit is contained in:
parent
63ddc52a6b
commit
25f8b0337e
22 changed files with 711 additions and 386 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue