summaryrefslogtreecommitdiff
path: root/git/objects
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects')
-rw-r--r--git/objects/submodule/base.py2
-rw-r--r--git/objects/submodule/root.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index a35240f1..55e2ea27 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -540,7 +540,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
diff --git a/git/objects/submodule/root.py b/git/objects/submodule/root.py
index 4fe856c2..fbd658d7 100644
--- a/git/objects/submodule/root.py
+++ b/git/objects/submodule/root.py
@@ -17,7 +17,6 @@ log.addHandler(logging.NullHandler())
class RootUpdateProgress(UpdateProgress):
-
"""Utility class which adds more opcodes to the UpdateProgress"""
REMOVE, PATHCHANGE, BRANCHCHANGE, URLCHANGE = [
1 << x for x in range(UpdateProgress._num_op_codes, UpdateProgress._num_op_codes + 4)]
@@ -25,6 +24,7 @@ class RootUpdateProgress(UpdateProgress):
__slots__ = tuple()
+
BEGIN = RootUpdateProgress.BEGIN
END = RootUpdateProgress.END
REMOVE = RootUpdateProgress.REMOVE