##// END OF EJS Templates
patch: match 'diff --git a/' instead of 'diff --git'...
Sean Farley -
r18830:6b827d84 default
parent child Browse files
Show More
@@ -314,7 +314,7 b' def readgitpatch(lr):'
314 gitpatches = []
314 gitpatches = []
315 for line in lr:
315 for line in lr:
316 line = line.rstrip(' \r\n')
316 line = line.rstrip(' \r\n')
317 if line.startswith('diff --git'):
317 if line.startswith('diff --git a/'):
318 m = gitre.match(line)
318 m = gitre.match(line)
319 if m:
319 if m:
320 if gp:
320 if gp:
@@ -1211,7 +1211,7 b' def iterhunks(fp):'
1211 emitfile = False
1211 emitfile = False
1212 yield 'file', (afile, bfile, h, gp and gp.copy() or None)
1212 yield 'file', (afile, bfile, h, gp and gp.copy() or None)
1213 yield 'hunk', h
1213 yield 'hunk', h
1214 elif x.startswith('diff --git'):
1214 elif x.startswith('diff --git a/'):
1215 m = gitre.match(x.rstrip(' \r\n'))
1215 m = gitre.match(x.rstrip(' \r\n'))
1216 if not m:
1216 if not m:
1217 continue
1217 continue
@@ -1815,7 +1815,7 b' def diffstatdata(lines):'
1815 addresult()
1815 addresult()
1816 # set numbers to 0 anyway when starting new file
1816 # set numbers to 0 anyway when starting new file
1817 adds, removes, isbinary = 0, 0, False
1817 adds, removes, isbinary = 0, 0, False
1818 if line.startswith('diff --git'):
1818 if line.startswith('diff --git a/'):
1819 filename = gitre.search(line).group(1)
1819 filename = gitre.search(line).group(1)
1820 elif line.startswith('diff -r'):
1820 elif line.startswith('diff -r'):
1821 # format: "diff -r ... -r ... filename"
1821 # format: "diff -r ... -r ... filename"
General Comments 0
You need to be logged in to leave comments. Login now