mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 07:15:43 +03:00
parent
e04c97b9fa
commit
0bd4d15e47
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ func parsePrettyFormatLog(repo *Repository, logByts []byte) (*list.List, error)
|
|||
|
||||
func RefEndName(refStr string) string {
|
||||
if strings.HasPrefix(refStr, "refs/heads/") {
|
||||
return strings.TrimPrefix(refStr, "refs/heads/")
|
||||
// trim the "refs/heads/"
|
||||
return return refStr[11:]
|
||||
}
|
||||
|
||||
index := strings.LastIndex(refStr, "/")
|
||||
|
|
Loading…
Reference in a new issue