diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-12-08 12:47:12 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-12-08 12:47:12 +0100 |
commit | b93ba7ca6913ce7f29e118fd573f6ed95808912b (patch) | |
tree | 80c77215bccb6fcc119e5dbbfd0d98a456e02ceb | |
parent | 5149c807ec5f396c1114851ffbd0f88d65d4c84f (diff) | |
download | gitpython-b93ba7ca6913ce7f29e118fd573f6ed95808912b.tar.gz |
fix(submodule): don't fail if tracking branch can't be setup
Fixes #545
-rw-r--r-- | git/objects/submodule/base.py | 2 |
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 |