diff options
author | Piotr Pietraszkiewicz <ppietraszkiewicz@psi.de> | 2016-04-13 17:00:34 +0200 |
---|---|---|
committer | Piotr Pietraszkiewicz <ppietraszkiewicz@psi.de> | 2016-04-13 17:00:34 +0200 |
commit | af74966685e1d1f18390a783f6b8d26b3b1c26d1 (patch) | |
tree | 0efc9096f51722761b0aa6595cf6a22ed4c0b8a5 /git/test/test_index.py | |
parent | 9debf6b0aafb6f7781ea9d1383c86939a1aacde3 (diff) | |
download | gitpython-af74966685e1d1f18390a783f6b8d26b3b1c26d1.tar.gz |
fix(index): avoid recursing endlessly in add()
Issue #407
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r-- | git/test/test_index.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py index a928fe5e..7546f6be 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -796,3 +796,14 @@ class TestIndex(TestBase): r = Repo.init(rw_dir) r.index.add([fp]) r.index.commit('Added orig and prestable') + + @with_rw_directory + def test_add_a_file_with_wildcard_chars(self, rw_dir): + # see issue #407 + fp = os.path.join(rw_dir, '[.exe') + with open(fp, "w") as f: + f.write(b'something') + + r = Repo.init(rw_dir) + r.index.add([fp]) + r.index.commit('Added [.exe') |