mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
rename sha to hash 2
This commit is contained in:
@ -143,7 +143,7 @@ func (self *BisectCommands) IsDone() (bool, []string, error) {
|
||||
return false, nil, nil
|
||||
}
|
||||
|
||||
newSha := info.GetNewSha()
|
||||
newSha := info.GetNewHash()
|
||||
if newSha == "" {
|
||||
return false, nil, nil
|
||||
}
|
||||
@ -185,7 +185,7 @@ func (self *BisectCommands) IsDone() (bool, []string, error) {
|
||||
// render the commits from the bad commit.
|
||||
func (self *BisectCommands) ReachableFromStart(bisectInfo *BisectInfo) bool {
|
||||
cmdArgs := NewGitCmd("merge-base").
|
||||
Arg("--is-ancestor", bisectInfo.GetNewSha(), bisectInfo.GetStartSha()).
|
||||
Arg("--is-ancestor", bisectInfo.GetNewHash(), bisectInfo.GetStartHash()).
|
||||
ToArgv()
|
||||
|
||||
err := self.cmd.New(cmdArgs).DontLog().Run()
|
||||
|
@ -32,7 +32,7 @@ type BisectInfo struct {
|
||||
// map of commit hashes to their status
|
||||
statusMap map[string]BisectStatus
|
||||
|
||||
// the sha of the commit that's under test
|
||||
// the hash of the commit that's under test
|
||||
current string
|
||||
}
|
||||
|
||||
@ -49,21 +49,21 @@ func NewNullBisectInfo() *BisectInfo {
|
||||
return &BisectInfo{started: false}
|
||||
}
|
||||
|
||||
func (self *BisectInfo) GetNewSha() string {
|
||||
for sha, status := range self.statusMap {
|
||||
func (self *BisectInfo) GetNewHash() string {
|
||||
for hash, status := range self.statusMap {
|
||||
if status == BisectStatusNew {
|
||||
return sha
|
||||
return hash
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *BisectInfo) GetCurrentSha() string {
|
||||
func (self *BisectInfo) GetCurrentHash() string {
|
||||
return self.current
|
||||
}
|
||||
|
||||
func (self *BisectInfo) GetStartSha() string {
|
||||
func (self *BisectInfo) GetStartHash() string {
|
||||
return self.start
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ func (self *BisectInfo) Bisecting() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if self.GetNewSha() == "" {
|
||||
if self.GetNewHash() == "" {
|
||||
return false
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user