Browse Source

Use refStr[11:] instead of TrimPrefix

Fix #1965
pull/1994/head
Arthur Ouyang 9 years ago
parent
commit
0bd4d15e47
  1. 3
      modules/git/utils.go

3
modules/git/utils.go

@ -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…
Cancel
Save