summaryrefslogtreecommitdiffstats
path: root/modules/git/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/utils.go')
-rw-r--r--modules/git/utils.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/git/utils.go b/modules/git/utils.go
index 43a4da3d10..73d32d3541 100644
--- a/modules/git/utils.go
+++ b/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, "/")