From de5bc8f7076c5736ef1efa57345564fbc563bd19 Mon Sep 17 00:00:00 2001 From: Rick Copeland Date: Fri, 7 May 2010 15:18:19 -0400 Subject: Handle filenames with embedded spaces when generating diffs --- lib/git/diff.py | 2 +- test/git/test_refs.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/git/diff.py b/lib/git/diff.py index c7c54bdf..0dd4ed6e 100644 --- a/lib/git/diff.py +++ b/lib/git/diff.py @@ -342,7 +342,7 @@ class Diff(object): if not line.startswith(":"): continue # END its not a valid diff line - old_mode, new_mode, a_blob_id, b_blob_id, change_type, path = line[1:].split() + old_mode, new_mode, a_blob_id, b_blob_id, change_type, path = line[1:].split(None, 5) a_path = path b_path = path deleted_file = False diff --git a/test/git/test_refs.py b/test/git/test_refs.py index 58a51f4a..7c487bd0 100644 --- a/test/git/test_refs.py +++ b/test/git/test_refs.py @@ -37,6 +37,7 @@ class TestRefs(TestBase): assert tagobj.tag == tag.name assert isinstance( tagobj.tagger, Actor ) assert isinstance( tagobj.tagged_date, int ) + assert isinstance( tagobj.tagger_tz_offset, int ) assert tagobj.message # END if we have a tag object # END for tag in repo-tags -- cgit v1.2.1