1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-11 12:48:10 +03:00

Add copy commit attributes option

This commit is contained in:
Luka Markušić
2022-03-24 21:04:33 +01:00
committed by Jesse Duffield
parent bbaa651943
commit 540edb0bf4
8 changed files with 155 additions and 53 deletions

View File

@ -74,6 +74,12 @@ func (self *CommitCommands) GetCommitMessage(commitSha string) (string, error) {
return strings.TrimSpace(message), err
}
func (self *CommitCommands) GetCommitDiff(commitSha string) (string, error) {
cmdStr := "git show --no-color " + commitSha
diff, err := self.cmd.New(cmdStr).DontLog().RunWithOutput()
return diff, err
}
func (self *CommitCommands) GetCommitMessageFirstLine(sha string) (string, error) {
return self.GetCommitMessagesFirstLine([]string{sha})
}