From a223c7b7730c53c3fa1e4c019bd3daefbb8fd74b Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 19 Jan 2015 13:52:54 +0100 Subject: Submodule.move() fixed to deal with 'non-gitfile' clones appropriately. Improved a test to assure multiple update(init=False|True) calls don't throw. Fixes #93 --- git/objects/submodule/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/objects/submodule/base.py') diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 3e3eed78..1d05609d 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -636,7 +636,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): os.renames(cur_path, module_checkout_abspath) renamed_module = True - if self._need_gitfile_submodules(self.repo.git): + if os.path.isfile(os.path.join(module_checkout_abspath, '.git')): module_abspath = self._module_abspath(self.repo, self.path, self.name) self._write_git_file_and_module_config(module_checkout_abspath, module_abspath) # end handle git file rewrite -- cgit v1.2.1