summaryrefslogtreecommitdiff
path: root/git/objects/submodule/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects/submodule/util.py')
-rw-r--r--git/objects/submodule/util.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/git/objects/submodule/util.py b/git/objects/submodule/util.py
index 492d9dbe..237321e2 100644
--- a/git/objects/submodule/util.py
+++ b/git/objects/submodule/util.py
@@ -17,11 +17,11 @@ def sm_name(section):
""":return: name of the submodule as parsed from the section name"""
section = section.strip()
return section[11:-1]
-
+
def mkhead(repo, path):
""":return: New branch/head instance"""
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"""
@@ -33,7 +33,7 @@ def unbare_repo(func):
# 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:
@@ -44,7 +44,7 @@ def find_first_remote_branch(remotes, branch_name):
# END exception handling
#END for remote
raise InvalidGitRepositoryError("Didn't find remote branch %r in any of the given remotes", branch_name)
-
+
#} END utilities
@@ -56,16 +56,16 @@ class SubmoduleConfigParser(GitConfigParser):
with the new data, if we have written into a stream. Otherwise it will
add the local file to the index to make it correspond with the working tree.
Additionally, the cache must be cleared
-
+
Please note that no mutating method will work in bare mode
"""
-
+
def __init__(self, *args, **kwargs):
self._smref = None
self._index = None
self._auto_write = True
super(SubmoduleConfigParser, self).__init__(*args, **kwargs)
-
+
#{ Interface
def set_submodule(self, submodule):
"""Set this instance's submodule. It must be called before
@@ -77,7 +77,7 @@ class SubmoduleConfigParser(GitConfigParser):
assert self._smref is not None
# should always have a file here
assert not isinstance(self._file_or_files, StringIO)
-
+
sm = self._smref()
if sm is not None:
index = self._index
@@ -89,7 +89,7 @@ class SubmoduleConfigParser(GitConfigParser):
# END handle weakref
#} END interface
-
+
#{ Overridden Methods
def write(self):
rval = super(SubmoduleConfigParser, self).write()