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:
@ -74,7 +74,7 @@ func (self *BisectController) openMidBisectMenu(info *git_commands.BisectInfo, c
|
||||
// ref, because we'll be reloading our commits in that case.
|
||||
waitToReselect := selectCurrentAfter && !self.c.Git().Bisect.ReachableFromStart(info)
|
||||
|
||||
// If we have a current sha already, then we always want to use that one. If
|
||||
// If we have a current hash already, then we always want to use that one. If
|
||||
// not, we're still picking the initial commits before we really start, so
|
||||
// use the selected commit in that case.
|
||||
|
||||
@ -285,7 +285,7 @@ func (self *BisectController) afterBisectMarkRefresh(selectCurrent bool, waitToR
|
||||
func (self *BisectController) selectCurrentBisectCommit() {
|
||||
info := self.c.Git().Bisect.GetInfo()
|
||||
if info.GetCurrentHash() != "" {
|
||||
// find index of commit with that sha, move cursor to that.
|
||||
// find index of commit with that hash, move cursor to that.
|
||||
for i, commit := range self.c.Model().Commits {
|
||||
if commit.Hash == info.GetCurrentHash() {
|
||||
self.context().SetSelection(i)
|
||||
|
@ -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()
|
||||
|
@ -299,7 +299,7 @@ func (self *RefreshHelper) determineCheckedOutBranchName() string {
|
||||
// In all other cases, get the branch name by asking git what branch is
|
||||
// checked out. Note that if we're on a detached head (for reasons other
|
||||
// than rebasing or bisecting, i.e. it was explicitly checked out), then
|
||||
// this will return its sha.
|
||||
// this will return its hash.
|
||||
if branchName, err := self.c.Git().Branch.CurrentBranchName(); err == nil {
|
||||
return branchName
|
||||
}
|
||||
|
Reference in New Issue
Block a user