|
|
@ -7,6 +7,7 @@ package gitgraph |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"bytes" |
|
|
|
"bytes" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
|
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
|
|
"code.gitea.io/gitea/models" |
|
|
|
"code.gitea.io/gitea/models" |
|
|
|
"code.gitea.io/gitea/modules/git" |
|
|
|
"code.gitea.io/gitea/modules/git" |
|
|
@ -216,10 +217,10 @@ func newRefsFromRefNames(refNames []byte) []git.Reference { |
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
refName := string(refNameBytes) |
|
|
|
refName := string(refNameBytes) |
|
|
|
if refName[0:5] == "tag: " { |
|
|
|
if strings.HasPrefix(refName, "tag: ") { |
|
|
|
refName = refName[5:] |
|
|
|
refName = strings.TrimPrefix(refName, "tag: ") |
|
|
|
} else if refName[0:8] == "HEAD -> " { |
|
|
|
} else if strings.HasPrefix(refName, "HEAD -> ") { |
|
|
|
refName = refName[8:] |
|
|
|
refName = strings.TrimPrefix(refName, "HEAD -> ") |
|
|
|
} |
|
|
|
} |
|
|
|
refs = append(refs, git.Reference{ |
|
|
|
refs = append(refs, git.Reference{ |
|
|
|
Name: refName, |
|
|
|
Name: refName, |
|
|
|