mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
add feature of display diff between specific commits #397
This commit is contained in:
parent
1a933eaa73
commit
c350cdba43
11 changed files with 131 additions and 24 deletions
|
@ -910,3 +910,9 @@ func (c *GitCommand) ResetHardHead() error {
|
|||
func (c *GitCommand) ResetSoftHead() error {
|
||||
return c.OSCommand.RunCommand("git reset --soft HEAD")
|
||||
}
|
||||
|
||||
// DiffCommits show diff between commits
|
||||
func (c *GitCommand) DiffCommits(sha1, sha2 string) (string, error) {
|
||||
cmd := fmt.Sprintf("git diff --color %s %s", sha1, sha2)
|
||||
return c.OSCommand.RunCommandWithOutput(cmd)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue