diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-04-14 07:12:57 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-04-14 07:12:57 +0200 |
commit | 978eb5bd4751acf9d53c8b6626dc3f7832a20ccf (patch) | |
tree | c4dcf0b69d49eaa4dcd1d8bc8e59822405704944 /git/test/test_index.py | |
parent | 9debf6b0aafb6f7781ea9d1383c86939a1aacde3 (diff) | |
parent | 6f6713669a8a32af90a73d03a7fa24e6154327f2 (diff) | |
download | gitpython-978eb5bd4751acf9d53c8b6626dc3f7832a20ccf.tar.gz |
Merge pull request #410 from ppietrasa/master
fix(index): avoid recursing endlessly in add()
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..f5f9d707 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, "wb") as f: + f.write(b'something') + + r = Repo.init(rw_dir) + r.index.add([fp]) + r.index.commit('Added [.exe') |