diff options
author | Barry Scott <barry@barrys-emacs.org> | 2016-07-29 11:33:17 +0100 |
---|---|---|
committer | Barry Scott <barry@barrys-emacs.org> | 2016-07-29 11:33:17 +0100 |
commit | 1116ef7e1bcbbc71d0b654b63156b29bfbf9afab (patch) | |
tree | cf36c9a204dde27f8e2a770be83cf5258bdb1d50 /git/test/test_diff.py | |
parent | b4b5ecc217154405ac0f6221af99a4ab18d067f6 (diff) | |
parent | a4ad7cee0f8723226446a993d4f1f3b98e42583a (diff) | |
download | gitpython-1116ef7e1bcbbc71d0b654b63156b29bfbf9afab.tar.gz |
Merge remote-tracking branch 'upstream/master'
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 ba0d2d13..9fdb26a2 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -104,6 +104,15 @@ class TestDiff(TestBase): assert diff.rename_to == 'that' assert len(list(diffs.iter_change_type('R'))) == 1 + def test_diff_of_modified_files_not_added_to_the_index(self): + output = StringProcessAdapter(fixture('diff_abbrev-40_full-index_M_raw_no-color')) + diffs = Diff._index_from_raw_format(self.rorepo, output.stdout) + + assert len(diffs) == 1, 'one modification' + assert len(list(diffs.iter_change_type('M'))) == 1, 'one modification' + assert diffs[0].change_type == 'M' + assert diffs[0].b_blob is None + def test_binary_diff(self): for method, file_name in ((Diff._index_from_patch_format, 'diff_patch_binary'), (Diff._index_from_raw_format, 'diff_raw_binary')): |