From 7dd618655c96ff32b5c30e41a5406c512bcbb65f Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 19 Nov 2010 10:27:30 +0100 Subject: test_submodule: fixed failures that arose due to changes of the original submodule names. Also, a major bug was fixed that cased submodules to always being updated recursively when using the RootModule.update method submodule: previously, it would update the repository configuration during add(), but in fact it must be done during update() when the module is cloned, which is how the git-submodule implementation works --- lib/git/objects/submodule/base.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/git/objects/submodule/base.py') diff --git a/lib/git/objects/submodule/base.py b/lib/git/objects/submodule/base.py index 347af58e..b72eac82 100644 --- a/lib/git/objects/submodule/base.py +++ b/lib/git/objects/submodule/base.py @@ -261,12 +261,6 @@ class Submodule(util.IndexObject, Iterable, Traversable): # END handle path del(writer) - # NOTE: Have to write the repo config file as well, otherwise - # the default implementation will be offended and not update the repository - # Maybe this is a good way to assure it doesn't get into our way, but - # we want to stay backwards compatible too ... . Its so redundant ! - repo.config_writer().set_value(sm_section(sm.name), 'url', url) - # we deliberatly assume that our head matches our index ! pcommit = repo.head.commit sm._parent_commit = pcommit @@ -350,6 +344,12 @@ class Submodule(util.IndexObject, Iterable, Traversable): except IndexError: print >> sys.stderr, "Warning: Failed to checkout tracking branch %s" % self.branch #END handle tracking branch + + # NOTE: Have to write the repo config file as well, otherwise + # the default implementation will be offended and not update the repository + # Maybe this is a good way to assure it doesn't get into our way, but + # we want to stay backwards compatible too ... . Its so redundant ! + self.repo.config_writer().set_value(sm_section(self.name), 'url', self.url) #END handle initalization -- cgit v1.2.1