diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-21 18:56:29 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-21 18:57:34 +0100 |
commit | d565a874f29701531ce1fc0779592838040d3edf (patch) | |
tree | c2ba9a69ae90eedc01616b409a179baf705a3feb /git/objects/submodule/util.py | |
parent | e4d3809161fc54d6913c0c2c7f6a7b51eebe223f (diff) | |
download | gitpython-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.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: |