1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 12:38:20 +00:00

update git vendor (#4059) (#4075)

* update git vendor (#4059)

* fix errors resulting from git vendor update

* fmt
This commit is contained in:
David Schneiderbauer
2018-06-04 22:33:42 +02:00
committed by Lauris BH
parent 561f459364
commit 1b10bc0cdf
12 changed files with 265 additions and 117 deletions

View File

@@ -14,6 +14,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"strconv"
"strings"
"code.gitea.io/git"
@@ -368,8 +369,15 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D
a := line[beg+2 : middle]
b := line[middle+3:]
if hasQuote {
a = string(git.UnescapeChars([]byte(a[1 : len(a)-1])))
b = string(git.UnescapeChars([]byte(b[1 : len(b)-1])))
var err error
a, err = strconv.Unquote(a)
if err != nil {
return nil, fmt.Errorf("Unquote: %v", err)
}
b, err = strconv.Unquote(b)
if err != nil {
return nil, fmt.Errorf("Unquote: %v", err)
}
}
curFile = &DiffFile{