summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2016-12-08 12:47:12 +0100
committerSebastian Thiel <byronimo@gmail.com>2016-12-08 12:47:12 +0100
commitb93ba7ca6913ce7f29e118fd573f6ed95808912b (patch)
tree80c77215bccb6fcc119e5dbbfd0d98a456e02ceb
parent5149c807ec5f396c1114851ffbd0f88d65d4c84f (diff)
downloadgitpython-b93ba7ca6913ce7f29e118fd573f6ed95808912b.tar.gz
fix(submodule): don't fail if tracking branch can't be setup
Fixes #545
-rw-r--r--git/objects/submodule/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index 18988b97..ac1922e3 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -537,7 +537,7 @@ class Submodule(IndexObject, Iterable, Traversable):
# make sure HEAD is not detached
mrepo.head.set_reference(local_branch, logmsg="submodule: attaching head to %s" % local_branch)
mrepo.head.ref.set_tracking_branch(remote_branch)
- except IndexError:
+ except (IndexError, InvalidGitRepositoryError):
log.warn("Failed to checkout tracking branch %s", self.branch_path)
# END handle tracking branch