mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-04 10:34:55 +02:00
fix: fix copying author name to clipboard
This commit is contained in:
parent
5eefe5b5b1
commit
5717e72366
@ -87,13 +87,13 @@ type Author struct {
|
||||
}
|
||||
|
||||
func (self *CommitCommands) GetCommitAuthor(commitSha string) (Author, error) {
|
||||
cmdStr := "git show --no-patch --pretty=format:'%an|%ae' " + commitSha
|
||||
cmdStr := "git show --no-patch --pretty=format:'%an%x00%ae' " + commitSha
|
||||
output, err := self.cmd.New(cmdStr).DontLog().RunWithOutput()
|
||||
if err != nil {
|
||||
return Author{}, err
|
||||
}
|
||||
|
||||
split := strings.Split(strings.TrimSpace(output), "|")
|
||||
split := strings.SplitN(strings.TrimSpace(output), "\x00", 2)
|
||||
if len(split) < 2 {
|
||||
return Author{}, errors.New("unexpected git output")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user