mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
Add copy commit attributes option
This commit is contained in:
parent
bbaa651943
commit
540edb0bf4
8 changed files with 155 additions and 53 deletions
|
@ -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})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue