mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-14 01:35:55 +09:00
gitlab-like hash naming
This commit is contained in:
1 parent
be19fe48d7
commit
563e8b4ea9
3 files changed
+18
-13
No files matched your search
@@ -41,6 +41,10 @@ func List(l *list.List) chan interface{} {
|
||||
return c
|
||||
}
|
||||
|
||||
func Sha1(str string) string {
|
||||
return EncodeSha1(str)
|
||||
}
|
||||
|
||||
func ShortSha(sha1 string) string {
|
||||
if len(sha1) == 40 {
|
||||
return sha1[:10]
|
||||
@@ -160,6 +164,7 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
|
||||
},
|
||||
"DiffTypeToStr": DiffTypeToStr,
|
||||
"DiffLineTypeToStr": DiffLineTypeToStr,
|
||||
"Sha1": Sha1,
|
||||
"ShortSha": ShortSha,
|
||||
"Md5": EncodeMd5,
|
||||
"ActionContent2Commits": ActionContent2Commits,
|
||||
|
||||
Reference in new issue
Block a user