From 27c31e2fde54c0587c032ccffdaa7c4ddf5b2ae5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 15 Jan 2015 16:03:47 +0100 Subject: Added the first submodule will no longer cause an IOError. This is verified by the respective test. Fixes #117 --- git/test/test_submodule.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'git/test/test_submodule.py') diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py index 99996ce3..524a69bf 100644 --- a/git/test/test_submodule.py +++ b/git/test/test_submodule.py @@ -582,3 +582,10 @@ class TestSubmodule(TestBase): # gitdb: has either 1 or 2 submodules depending on the version assert len(nsm.children()) >= 1 and nsmc.module_exists() + + @with_rw_repo(k_no_subm_tag, bare=False) + def test_first_submodule(self, rwrepo): + assert len(list(rwrepo.iter_submodules())) == 0 + sm = rwrepo.create_submodule('first', 'submodules/first', rwrepo.git_dir, no_checkout=True) + assert sm.exists() and sm.module_exists() + rwrepo.index.commit("Added submodule") -- cgit v1.2.3