Skip to content

Commit b93ba7c

Browse files
committed
fix(submodule): don't fail if tracking branch can't be setup
Fixes #545
1 parent 5149c80 commit b93ba7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎git/objects/submodule/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def update(self, recursive=False, init=True, to_latest_revision=False, progress=
537537
# make sure HEAD is not detached
538538
mrepo.head.set_reference(local_branch, logmsg="submodule: attaching head to %s" % local_branch)
539539
mrepo.head.ref.set_tracking_branch(remote_branch)
540-
except IndexError:
540+
except (IndexError, InvalidGitRepositoryError):
541541
log.warn("Failed to checkout tracking branch %s", self.branch_path)
542542
# END handle tracking branch
543543

0 commit comments

Comments
 (0)