mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-17 14:00:01 +02:00
* Fix #3321: commit tag shortener * Check short commit * remove debug * Edit unit tests * Show 10-char short SHA
This commit is contained in:
parent
2cb04db526
commit
7eafe3213f
3 changed files with 5 additions and 5 deletions
|
@ -45,7 +45,7 @@ func EncodeSha1(str string) string {
|
|||
}
|
||||
|
||||
func ShortSha(sha1 string) string {
|
||||
if len(sha1) == 40 {
|
||||
if len(sha1) > 10 {
|
||||
return sha1[:10]
|
||||
}
|
||||
return sha1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue