From fc56f42dc35a60395ca8def114a23a6c7655c410 Mon Sep 17 00:00:00 2001
From: Arthur Ouyang <arthur.oy+github@gmail.com>
Date: Thu, 19 Nov 2015 08:10:44 +0800
Subject: [PATCH] Use refStr[len("refs/heads/"):] instead of refStr[11:] and
 fix error

Fix #1965
---
 modules/git/utils.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/git/utils.go b/modules/git/utils.go
index 73d32d3541..d2d0c19ed9 100644
--- a/modules/git/utils.go
+++ b/modules/git/utils.go
@@ -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, "/")