diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-08 11:13:41 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-08 11:16:49 +0100 |
commit | 987f9bbd08446de3f9d135659f2e36ad6c9d14fb (patch) | |
tree | 08152431363821b26367fafa5c97990ceb26b700 /git/test/test_diff.py | |
parent | 27b4efed7a435153f18598796473b3fba06c513d (diff) | |
download | gitpython-987f9bbd08446de3f9d135659f2e36ad6c9d14fb.tar.gz |
Added support for rename detection in raw mode (which is the default).
Fixes #36
Diffstat (limited to 'git/test/test_diff.py')
-rw-r--r-- | git/test/test_diff.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py index c5183089..ce0f64f2 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -56,6 +56,15 @@ class TestDiff(TestBase): assert_equal(diff.rename_from, 'AUTHORS') assert_equal(diff.rename_to, 'CONTRIBUTORS') + output = StringProcessAdapter(fixture('diff_rename_raw')) + diffs = Diff._index_from_raw_format(self.rorepo, output.stdout) + assert len(diffs) == 1 + diff = diffs[0] + assert diff.renamed + assert diff.rename_from == 'this' + assert diff.rename_to == 'that' + assert len(list(diffs.iter_change_type('R'))) == 1 + def test_diff_patch_format(self): # test all of the 'old' format diffs for completness - it should at least # be able to deal with it |