mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 12:15:43 +01:00
Use refStr[len("refs/heads/"):] instead of refStr[11:] and fix error
Fix #1965
This commit is contained in:
parent
0bd4d15e47
commit
fc56f42dc3
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ func parsePrettyFormatLog(repo *Repository, logByts []byte) (*list.List, error)
|
|||
func RefEndName(refStr string) string {
|
||||
if strings.HasPrefix(refStr, "refs/heads/") {
|
||||
// trim the "refs/heads/"
|
||||
return return refStr[11:]
|
||||
return refStr[len("refs/heads/"):]
|
||||
}
|
||||
|
||||
index := strings.LastIndex(refStr, "/")
|
||||
|
|
Loading…
Reference in a new issue