mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 23:14:32 +02:00
fix: handle git branch name with special chars correctly (#39483)
Fix the bugs: * Commit graph page doesn't show * PR command line instructions are wrong --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
1 parent
a71c5c94c5
commit
fe31237fd8
7 files changed
+56
-33
No files matched your search
@@ -216,7 +216,7 @@ func parseGitTime(timeStr string) time.Time {
|
||||
|
||||
// NewCommit creates a new commit from a provided line
|
||||
func NewCommit(row, column int, line []byte) (*Commit, error) {
|
||||
data := bytes.SplitN(line, []byte("|"), 5)
|
||||
data := bytes.SplitN(line, []byte(gitLogGraphFormatSep), 5)
|
||||
if len(data) < 5 {
|
||||
return nil, fmt.Errorf("malformed data section on line %d with commit: %s", row, string(line))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user