summaryrefslogtreecommitdiff
path: root/lib/git/utils.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-11 16:49:05 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-11 16:49:05 +0200
commit9374a916588d9fe7169937ba262c86ad710cfa74 (patch)
treedfe77a02cfa3fbe34563326cea95e92694d21b9a /lib/git/utils.py
parent20f202d83bdf1f332a3cb8f010bcf8bf3c2807bd (diff)
downloadgitpython-9374a916588d9fe7169937ba262c86ad710cfa74.tar.gz
converted all spaces to tabs ( 4 spaces = 1 tab ) just to allow me and my editor to work with the files properly. Can convert it back for releaes
Diffstat (limited to 'lib/git/utils.py')
-rw-r--r--lib/git/utils.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/git/utils.py b/lib/git/utils.py
index 5d0ba8ca..c204c432 100644
--- a/lib/git/utils.py
+++ b/lib/git/utils.py
@@ -7,20 +7,20 @@
import os
def dashify(string):
- return string.replace('_', '-')
+ return string.replace('_', '-')
def touch(filename):
- os.utime(filename)
+ os.utime(filename)
def is_git_dir(d):
- """ This is taken from the git setup.c:is_git_directory
- function."""
+ """ This is taken from the git setup.c:is_git_directory
+ function."""
- if os.path.isdir(d) and \
- os.path.isdir(os.path.join(d, 'objects')) and \
- os.path.isdir(os.path.join(d, 'refs')):
- headref = os.path.join(d, 'HEAD')
- return os.path.isfile(headref) or \
- (os.path.islink(headref) and
- os.readlink(headref).startswith('refs'))
- return False
+ if os.path.isdir(d) and \
+ os.path.isdir(os.path.join(d, 'objects')) and \
+ os.path.isdir(os.path.join(d, 'refs')):
+ headref = os.path.join(d, 'HEAD')
+ return os.path.isfile(headref) or \
+ (os.path.islink(headref) and
+ os.readlink(headref).startswith('refs'))
+ return False