aboutsummaryrefslogtreecommitdiff
path: root/git/repo
diff options
context:
space:
mode:
Diffstat (limited to 'git/repo')
-rw-r--r--git/repo/base.py3
-rw-r--r--git/repo/fun.py7
2 files changed, 6 insertions, 4 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index 121624b9..f592f9d7 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -52,6 +52,7 @@ __all__ = ('Repo', )
class Repo(object):
+
"""Represents a git repository and allows you to query references,
gather commit information, generate diffs, create and clone repositories query
the log.
@@ -174,8 +175,6 @@ class Repo(object):
del _get_description
del _set_description
-
-
@property
def working_tree_dir(self):
""":return: The working tree directory of our git repository
diff --git a/git/repo/fun.py b/git/repo/fun.py
index fe26d8ce..15c5762b 100644
--- a/git/repo/fun.py
+++ b/git/repo/fun.py
@@ -15,10 +15,12 @@ from string import digits
__all__ = ('rev_parse', 'is_git_dir', 'touch')
+
def touch(filename):
fp = open(filename, "a")
fp.close()
+
def is_git_dir(d):
""" This is taken from the git setup.c:is_git_directory
function."""
@@ -101,6 +103,7 @@ def name_to_object(repo, name, return_ref=False):
return Object.new_from_sha(repo, hex_to_bin(hexsha))
+
def deref_tag(tag):
"""Recursively dereerence a tag and return the resulting object"""
while True:
@@ -111,6 +114,7 @@ def deref_tag(tag):
# END dereference tag
return tag
+
def to_commit(obj):
"""Convert the given object to a commit if possible and return it"""
if obj.type == 'tag':
@@ -121,6 +125,7 @@ def to_commit(obj):
# END verify type
return obj
+
def rev_parse(repo, rev):
"""
:return: Object at the given revision, either Commit, Tag, Tree or Blob
@@ -170,7 +175,6 @@ def rev_parse(repo, rev):
#END handle ref
# END initialize obj on first token
-
start += 1
# try to parse {type}
@@ -254,7 +258,6 @@ def rev_parse(repo, rev):
# END set default num
# END number parsing only if non-blob mode
-
parsed_to = start
# handle hiererarchy walk
try: