summaryrefslogtreecommitdiffstats
path: root/models/git_diff.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-03 17:25:39 -0500
committerUnknwon <u@gogs.io>2015-11-03 17:25:39 -0500
commit25ec20d5251511ebd0b9e6b963e189b860c39704 (patch)
tree7c771f0a8403fd62811fdadcbe8d118d89edec20 /models/git_diff.go
parent8e262f3ec4c961487fe56b6b64573a2f9b928c70 (diff)
downloadgitea-25ec20d5251511ebd0b9e6b963e189b860c39704.tar.gz
gitea-25ec20d5251511ebd0b9e6b963e189b860c39704.zip
#1838 update merge base before generate new patch
Diffstat (limited to 'models/git_diff.go')
-rw-r--r--models/git_diff.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/models/git_diff.go b/models/git_diff.go
index 3bf938ae40..c1568a5759 100644
--- a/models/git_diff.go
+++ b/models/git_diff.go
@@ -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,