#1838 update merge base before generate new patch

This commit is contained in:
Unknwon 2015-11-03 17:25:39 -05:00
parent 8e262f3ec4
commit 25ec20d525
6 changed files with 64 additions and 24 deletions

View file

@ -97,7 +97,7 @@ func ParsePatch(pid int64, maxlines int, cmd *exec.Cmd, reader io.Reader) (*Diff
var i int
for scanner.Scan() {
line := scanner.Text()
// fmt.Println(i, line)
if strings.HasPrefix(line, "+++ ") || strings.HasPrefix(line, "--- ") {
continue
}
@ -180,8 +180,6 @@ func ParsePatch(pid int64, maxlines int, cmd *exec.Cmd, reader io.Reader) (*Diff
b = b[1 : len(b)-1]
}
fmt.Println(a, b)
curFile = &DiffFile{
Name: a,
Index: len(diff.Files) + 1,