diff options
author | Dave Wapstra <dwapstra@cisco.com> | 2022-09-27 13:49:17 +1300 |
---|---|---|
committer | Dave Wapstra <dwapstra@cisco.com> | 2022-09-27 14:04:50 +1300 |
commit | 41003c548f9df2dc389f14be58b5a41d35d0e73d (patch) | |
tree | 690911c6f8014a2705f4721ef2fe65a2fea5f182 /git/diff.py | |
parent | b27c41aac3cbc95ad15823058228b8d2461b8e7c (diff) | |
download | gitpython-41003c548f9df2dc389f14be58b5a41d35d0e73d.tar.gz |
Ignore empty info in diff line
Diffstat (limited to 'git/diff.py')
-rw-r--r-- | git/diff.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git/diff.py b/git/diff.py index 48b0e0d6..c4424592 100644 --- a/git/diff.py +++ b/git/diff.py @@ -574,6 +574,9 @@ class Diff(object): _, _, lines = lines.partition(":") for line in lines.split("\x00:"): + if not line: + # The line data is empty, skip + continue meta, _, path = line.partition("\x00") path = path.rstrip("\x00") a_blob_id: Optional[str] |