diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-19 10:27:30 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-19 10:28:15 +0100 |
commit | 7dd618655c96ff32b5c30e41a5406c512bcbb65f (patch) | |
tree | 2bc0beaf64de62cc7bf11cdc5a4c089e546e0e4c /lib/git | |
parent | 45c0f285a6d9d9214f8167742d12af2855f527fb (diff) | |
download | gitpython-7dd618655c96ff32b5c30e41a5406c512bcbb65f.tar.gz |
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
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/objects/submodule/base.py | 12 | ||||
-rw-r--r-- | lib/git/objects/submodule/root.py | 2 |
2 files changed, 7 insertions, 7 deletions
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 diff --git a/lib/git/objects/submodule/root.py b/lib/git/objects/submodule/root.py index 82b8b271..06649136 100644 --- a/lib/git/objects/submodule/root.py +++ b/lib/git/objects/submodule/root.py @@ -244,7 +244,7 @@ class RootModule(Submodule): ###################################### for sm in sms: # update the submodule using the default method - sm.update(recursive=True, init=init, to_latest_revision=to_latest_revision) + sm.update(recursive=False, init=init, to_latest_revision=to_latest_revision) # update recursively depth first - question is which inconsitent # state will be better in case it fails somewhere. Defective branch |