mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-09-16 09:16:26 +02:00
rename sha to hash
This commit is contained in:
@@ -123,7 +123,7 @@ func GetCommitListDisplayStrings(
|
||||
!lo.Contains(common.UserConfig.Git.MainBranches, b.Name) &&
|
||||
// Don't show a marker for the head commit unless the
|
||||
// rebase.updateRefs config is on
|
||||
(hasRebaseUpdateRefsConfig || b.CommitHash != commits[0].Sha)
|
||||
(hasRebaseUpdateRefsConfig || b.CommitHash != commits[0].Hash)
|
||||
}))
|
||||
|
||||
lines := make([][]string, 0, len(filteredCommits))
|
||||
@@ -131,13 +131,13 @@ func GetCommitListDisplayStrings(
|
||||
willBeRebased := markedBaseCommit == ""
|
||||
for i, commit := range filteredCommits {
|
||||
unfilteredIdx := i + startIdx
|
||||
bisectStatus = getBisectStatus(unfilteredIdx, commit.Sha, bisectInfo, bisectBounds)
|
||||
bisectStatus = getBisectStatus(unfilteredIdx, commit.Hash, bisectInfo, bisectBounds)
|
||||
isYouAreHereCommit := false
|
||||
if showYouAreHereLabel && (commit.Action == models.ActionConflict || unfilteredIdx == rebaseOffset) {
|
||||
isYouAreHereCommit = true
|
||||
showYouAreHereLabel = false
|
||||
}
|
||||
isMarkedBaseCommit := commit.Sha != "" && commit.Sha == markedBaseCommit
|
||||
isMarkedBaseCommit := commit.Hash != "" && commit.Hash == markedBaseCommit
|
||||
if isMarkedBaseCommit {
|
||||
willBeRebased = true
|
||||
}
|
||||
@@ -172,11 +172,11 @@ func getbisectBounds(commits []*models.Commit, bisectInfo *git_commands.BisectIn
|
||||
bisectBounds := &bisectBounds{}
|
||||
|
||||
for i, commit := range commits {
|
||||
if commit.Sha == bisectInfo.GetNewSha() {
|
||||
if commit.Hash == bisectInfo.GetNewSha() {
|
||||
bisectBounds.newIndex = i
|
||||
}
|
||||
|
||||
status, ok := bisectInfo.Status(commit.Sha)
|
||||
status, ok := bisectInfo.Status(commit.Hash)
|
||||
if ok && status == git_commands.BisectStatusOld {
|
||||
bisectBounds.oldIndex = i
|
||||
return bisectBounds
|
||||
@@ -203,7 +203,7 @@ func loadPipesets(commits []*models.Commit) [][]*graph.Pipe {
|
||||
// given that our cache key is a commit hash and a commit count, it's very important that we don't actually try to render pipes
|
||||
// when dealing with things like filtered commits.
|
||||
cacheKey := pipeSetCacheKey{
|
||||
commitHash: commits[0].Sha,
|
||||
commitHash: commits[0].Hash,
|
||||
commitCount: len(commits),
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ func displayCommit(
|
||||
tagString = theme.DiffTerminalColor.SetBold().Sprint(strings.Join(commit.Tags, " ")) + " "
|
||||
}
|
||||
|
||||
if branchHeadsToVisualize.Includes(commit.Sha) &&
|
||||
if branchHeadsToVisualize.Includes(commit.Hash) &&
|
||||
// Don't show branch head on commits that are already merged to a main branch
|
||||
commit.Status != models.StatusMerged &&
|
||||
// Don't show branch head on a "pick" todo if the rebase.updateRefs config is on
|
||||
@@ -421,7 +421,7 @@ func getShaColor(
|
||||
return getBisectStatusColor(bisectStatus)
|
||||
}
|
||||
|
||||
diffed := commit.Sha != "" && commit.Sha == diffName
|
||||
diffed := commit.Hash != "" && commit.Hash == diffName
|
||||
shaColor := theme.DefaultTextColor
|
||||
switch commit.Status {
|
||||
case models.StatusUnpushed:
|
||||
@@ -439,7 +439,7 @@ func getShaColor(
|
||||
|
||||
if diffed {
|
||||
shaColor = theme.DiffTerminalColor
|
||||
} else if cherryPickedCommitHashSet.Includes(commit.Sha) {
|
||||
} else if cherryPickedCommitHashSet.Includes(commit.Hash) {
|
||||
shaColor = theme.CherryPickedCommitTextStyle
|
||||
} else if commit.Divergence == models.DivergenceRight && commit.Status != models.StatusMerged {
|
||||
shaColor = style.FgBlue
|
||||
|
Reference in New Issue
Block a user