diff options
Diffstat (limited to 'git/objects/submodule/util.py')
-rw-r--r-- | git/objects/submodule/util.py | 16 |
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: |