summaryrefslogtreecommitdiff
path: root/lib/git/objects/submodule/base.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-11-19 10:27:30 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-11-19 10:28:15 +0100
commit7dd618655c96ff32b5c30e41a5406c512bcbb65f (patch)
tree2bc0beaf64de62cc7bf11cdc5a4c089e546e0e4c /lib/git/objects/submodule/base.py
parent45c0f285a6d9d9214f8167742d12af2855f527fb (diff)
downloadgitpython-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/objects/submodule/base.py')
-rw-r--r--lib/git/objects/submodule/base.py12
1 files changed, 6 insertions, 6 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