Mercurial > hg-stable
diff mercurial/patch.py @ 20972:4e2fb0ad00a9
diff: use second filename for --stat reporting on git patches (issue4221)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 11 Apr 2014 16:38:55 -0400 |
parents | 9658a79968c6 |
children | bee0e1cffdd3 |
line wrap: on
line diff
--- a/mercurial/patch.py Fri Apr 11 13:43:41 2014 -0400 +++ b/mercurial/patch.py Fri Apr 11 16:38:55 2014 -0400 @@ -1859,7 +1859,7 @@ # set numbers to 0 anyway when starting new file adds, removes, isbinary = 0, 0, False if line.startswith('diff --git a/'): - filename = gitre.search(line).group(1) + filename = gitre.search(line).group(2) elif line.startswith('diff -r'): # format: "diff -r ... -r ... filename" filename = diffre.search(line).group(1)