Merge pull request #1994 from arthuroy/develop
Fix #1965 - the hyperlink and the display name of the branch
This commit is contained in:
commit
915bf1d2e3
3 changed files with 8 additions and 2 deletions
|
@ -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:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue