diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-21 08:52:23 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-21 08:53:14 +0100 |
commit | 47ac37be2e0e14e958ad24dc8cba1fa4b7f78700 (patch) | |
tree | c7544cb324a1141628e281828bc4f9bda295ae5c /git/objects/submodule/base.py | |
parent | bb0f3d78d6980a1d43f05cb17a8da57a196a34f3 (diff) | |
download | gitpython-47ac37be2e0e14e958ad24dc8cba1fa4b7f78700.tar.gz |
Assured that branch changes are properly handled.
Previously we could try to remove the branch we are on.
Of course, we have a test-case elaborate enough to verify we don't
destroy changes in submodules accidentally. Therefore I am confident
that this implementation is correct.
Fixes #49
Diffstat (limited to 'git/objects/submodule/base.py')
-rw-r--r-- | git/objects/submodule/base.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 4b2fc0c0..ebb66495 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -411,21 +411,9 @@ class Submodule(util.IndexObject, Iterable, Traversable): del(writer) # we deliberatly assume that our head matches our index ! - - try: - repo.head.commit - parent_repo_is_empty = False - except ValueError: - parent_repo_is_empty = True - # Can't set this yet, if the parent repo is empty. - # end sm.binsha = mrepo.head.commit.binsha index.add([sm], write=True) - if parent_repo_is_empty: - log.debug("Will not set _parent_commit now as the parent repository has no commit yet.") - # end - return sm def update(self, recursive=False, init=True, to_latest_revision=False, progress=None, dry_run=False, |