1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +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

@ -177,11 +177,11 @@ func SafeTruncate(str string, limit int) string {
const COMMIT_HASH_SHORT_SIZE = 8
func ShortSha(sha string) string {
if len(sha) < COMMIT_HASH_SHORT_SIZE {
return sha
func ShortSha(hash string) string {
if len(hash) < COMMIT_HASH_SHORT_SIZE {
return hash
}
return sha[:COMMIT_HASH_SHORT_SIZE]
return hash[:COMMIT_HASH_SHORT_SIZE]
}
// Returns comma-separated list of paths, with ellipsis if there are more than 3