Show More
@@ -1137,8 +1137,6 b' def iterhunks(fp):' | |||||
1137 | gp = changed.get(bfile) |
|
1137 | gp = changed.get(bfile) | |
1138 | if x.startswith('GIT binary patch'): |
|
1138 | if x.startswith('GIT binary patch'): | |
1139 | h = binhunk(gp, lr) |
|
1139 | h = binhunk(gp, lr) | |
1140 | afile = 'a/' + afile |
|
|||
1141 | bfile = 'b/' + bfile |
|
|||
1142 | else: |
|
1140 | else: | |
1143 | if context is None and x.startswith('***************'): |
|
1141 | if context is None and x.startswith('***************'): | |
1144 | context = True |
|
1142 | context = True | |
@@ -1154,15 +1152,16 b' def iterhunks(fp):' | |||||
1154 | # check for git diff, scanning the whole patch file if needed |
|
1152 | # check for git diff, scanning the whole patch file if needed | |
1155 | m = gitre.match(x) |
|
1153 | m = gitre.match(x) | |
1156 | if m: |
|
1154 | if m: | |
1157 | afile, bfile = m.group(1, 2) |
|
|||
1158 | if not git: |
|
1155 | if not git: | |
1159 | git = True |
|
1156 | git = True | |
1160 | gitpatches = scangitpatch(lr, x) |
|
1157 | gitpatches = scangitpatch(lr, x) | |
1161 | for gp in gitpatches: |
|
1158 | for gp in gitpatches: | |
1162 | changed[gp.path] = gp |
|
1159 | changed['b/' + gp.path] = gp | |
1163 | yield 'git', gitpatches |
|
1160 | yield 'git', gitpatches | |
|
1161 | afile = 'a/' + m.group(1) | |||
|
1162 | bfile = 'b/' + m.group(2) | |||
|
1163 | gp = changed[bfile] | |||
1164 | # copy/rename + modify should modify target, not source |
|
1164 | # copy/rename + modify should modify target, not source | |
1165 | gp = changed[bfile] |
|
|||
1166 | if gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD') or gp.mode: |
|
1165 | if gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD') or gp.mode: | |
1167 | afile = bfile |
|
1166 | afile = bfile | |
1168 | newfile = True |
|
1167 | newfile = True |
General Comments 0
You need to be logged in to leave comments.
Login now