Merge pull request #1994 from arthuroy/develop

Fix #1965 - the hyperlink and the display name of the branch
This commit is contained in:
Unknwon 2015-11-18 23:01:06 -05:00
commit 915bf1d2e3
3 changed files with 8 additions and 2 deletions

View file

@ -35,6 +35,11 @@ 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 refStr[len("refs/heads/"):]
}
index := strings.LastIndex(refStr, "/")
if index != -1 {
return refStr[index+1:]