mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-04 10:34:55 +02:00
Store full sha in branch model
The model will be used for logic, so the full hash is needed there; a shortened hash of 8 characters might be too short to be unique in very large repos. If some view wants to display a shortened hash, it should truncate it at presentation time.
This commit is contained in:
parent
092d5dd608
commit
0c07963a2e
@ -171,7 +171,7 @@ var branchFields = []string{
|
|||||||
"upstream:short",
|
"upstream:short",
|
||||||
"upstream:track",
|
"upstream:track",
|
||||||
"subject",
|
"subject",
|
||||||
fmt.Sprintf("objectname:short=%d", utils.COMMIT_HASH_SHORT_SIZE),
|
"objectname",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obtain branch information from parsed line output of getRawBranches()
|
// Obtain branch information from parsed line output of getRawBranches()
|
||||||
|
@ -71,7 +71,7 @@ func getBranchDisplayStrings(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if fullDescription || userConfig.Gui.ShowBranchCommitHash {
|
if fullDescription || userConfig.Gui.ShowBranchCommitHash {
|
||||||
res = append(res, b.CommitHash)
|
res = append(res, utils.ShortSha(b.CommitHash))
|
||||||
}
|
}
|
||||||
|
|
||||||
res = append(res, coloredName)
|
res = append(res, coloredName)
|
||||||
|
Loading…
Reference in New Issue
Block a user