1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

rename sha to hash 5

This commit is contained in:
pikomonde
2024-03-21 01:54:24 +07:00
committed by Stefan Haller
parent dc6863b83d
commit 9cf1ca10a2
14 changed files with 62 additions and 62 deletions

View File

@ -164,7 +164,7 @@ func (self *FixupHelper) parseDiff(diff string) ([]*deletedLineInfo, bool) {
// returns the list of commit hashes that introduced the lines which have now been deleted
func (self *FixupHelper) blameDeletedLines(deletedLineInfos []*deletedLineInfo) []string {
var wg sync.WaitGroup
shaChan := make(chan string)
hashChan := make(chan string)
for _, info := range deletedLineInfos {
wg.Add(1)
@ -178,19 +178,19 @@ func (self *FixupHelper) blameDeletedLines(deletedLineInfos []*deletedLineInfo)
}
blameLines := strings.Split(strings.TrimSuffix(blameOutput, "\n"), "\n")
for _, line := range blameLines {
shaChan <- strings.Split(line, " ")[0]
hashChan <- strings.Split(line, " ")[0]
}
}(info)
}
go func() {
wg.Wait()
close(shaChan)
close(hashChan)
}()
result := set.New[string]()
for sha := range shaChan {
result.Add(sha)
for hash := range hashChan {
result.Add(hash)
}
return result.ToSlice()