diff options
author | Jonathan Chu <jonathan.chu@me.com> | 2016-03-15 12:30:34 -0400 |
---|---|---|
committer | Jonathan Chu <jonathan.chu@me.com> | 2016-03-15 15:15:58 -0400 |
commit | 7b9c0c7f0a47360d8ab4e81d5655aaa3d5c814e6 (patch) | |
tree | ad19ee9a8d4ad6b324710502aa024ce54fc7bb29 /setup.py | |
parent | 5b6080369e7ee47b7d746685d264358c91d656bd (diff) | |
download | gitpython-0.3.2.1-patched.tar.gz |
Split diff line by '\t' for metadata and path0.3.2.1-patched
This protects against `.split(None)` which uses consecutive whitespace
as a separator to overlook paths where a single space is the filename.
For example, in this diff line:
line = ':100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
0000000000000000000000000000000000000000 D '
The deleted file is a file named ' ' (just one space). It's entirely
possible to commit this, remove, and to produce the following output
from `git diff`:
git diff --name-status <SHA1> <SHA2>
D
M path/to/another/file.py
...
This would cause the initial `.split(None, 5)` to fail as it will count
all consecutive whitespace as a separator, disregarding the ' ' (single
space) filename.
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions