summaryrefslogtreecommitdiff
path: root/git/objects/submodule/util.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-21 18:56:29 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-21 18:57:34 +0100
commitd565a874f29701531ce1fc0779592838040d3edf (patch)
treec2ba9a69ae90eedc01616b409a179baf705a3feb /git/objects/submodule/util.py
parente4d3809161fc54d6913c0c2c7f6a7b51eebe223f (diff)
downloadgitpython-d565a874f29701531ce1fc0779592838040d3edf.tar.gz
Fixed regression in test-suite for IndexFile
Previously, it checked for AssertionErrors, now we have to implement need-unbare-repo check ourselves.
Diffstat (limited to 'git/objects/submodule/util.py')
-rw-r--r--git/objects/submodule/util.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/git/objects/submodule/util.py b/git/objects/submodule/util.py
index 8b9873fc..0b4ce3c5 100644
--- a/git/objects/submodule/util.py
+++ b/git/objects/submodule/util.py
@@ -4,7 +4,7 @@ from git.config import GitConfigParser
from io import BytesIO
import weakref
-__all__ = ('sm_section', 'sm_name', 'mkhead', 'unbare_repo', 'find_first_remote_branch',
+__all__ = ('sm_section', 'sm_name', 'mkhead', 'find_first_remote_branch',
'SubmoduleConfigParser')
#{ Utilities
@@ -26,20 +26,6 @@ def mkhead(repo, path):
return git.Head(repo, git.Head.to_full_path(path))
-def unbare_repo(func):
- """Methods with this decorator raise InvalidGitRepositoryError if they
- encounter a bare repository"""
-
- def wrapper(self, *args, **kwargs):
- if self.repo.bare:
- raise InvalidGitRepositoryError("Method '%s' cannot operate on bare repositories" % func.__name__)
- # END bare method
- return func(self, *args, **kwargs)
- # END wrapper
- wrapper.__name__ = func.__name__
- return wrapper
-
-
def find_first_remote_branch(remotes, branch_name):
"""Find the remote branch matching the name of the given branch or raise InvalidGitRepositoryError"""
for remote in remotes: