Show More
@@ -1693,7 +1693,7 b' def pathtransform(path, strip, prefix):' | |||||
1693 | (count, strip, path)) |
|
1693 | (count, strip, path)) | |
1694 | i += 1 |
|
1694 | i += 1 | |
1695 | # consume '//' in the path |
|
1695 | # consume '//' in the path | |
1696 | while i < pathlen - 1 and path[i] == '/': |
|
1696 | while i < pathlen - 1 and path[i:i + 1] == '/': | |
1697 | i += 1 |
|
1697 | i += 1 | |
1698 | count -= 1 |
|
1698 | count -= 1 | |
1699 | return path[:i].lstrip(), prefix + path[i:].rstrip() |
|
1699 | return path[:i].lstrip(), prefix + path[i:].rstrip() | |
@@ -1788,7 +1788,7 b' def scanpatch(fp):' | |||||
1788 | else: |
|
1788 | else: | |
1789 | lr.push(fromfile) |
|
1789 | lr.push(fromfile) | |
1790 | yield 'file', header |
|
1790 | yield 'file', header | |
1791 | elif line[0] == ' ': |
|
1791 | elif line[0:1] == ' ': | |
1792 | yield 'context', scanwhile(line, lambda l: l[0] in ' \\') |
|
1792 | yield 'context', scanwhile(line, lambda l: l[0] in ' \\') | |
1793 | elif line[0] in '-+': |
|
1793 | elif line[0] in '-+': | |
1794 | yield 'hunk', scanwhile(line, lambda l: l[0] in '-+\\') |
|
1794 | yield 'hunk', scanwhile(line, lambda l: l[0] in '-+\\') |
General Comments 0
You need to be logged in to leave comments.
Login now