Skip to content

Commit de5bc8f

Browse files
Rick CopelandByron
authored andcommitted
Handle filenames with embedded spaces when generating diffs
1 parent c083f3d commit de5bc8f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/git/diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def _index_from_raw_format(cls, repo, stream):
342342
if not line.startswith(":"):
343343
continue
344344
# END its not a valid diff line
345-
old_mode, new_mode, a_blob_id, b_blob_id, change_type, path = line[1:].split()
345+
old_mode, new_mode, a_blob_id, b_blob_id, change_type, path = line[1:].split(None, 5)
346346
a_path = path
347347
b_path = path
348348
deleted_file = False

test/git/test_refs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def test_tag_base(self):
3737
assert tagobj.tag == tag.name
3838
assert isinstance( tagobj.tagger, Actor )
3939
assert isinstance( tagobj.tagged_date, int )
40+
assert isinstance( tagobj.tagger_tz_offset, int )
4041
assert tagobj.message
4142
# END if we have a tag object
4243
# END for tag in repo-tags

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy