summaryrefslogtreecommitdiff
path: root/git/util.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-06-08 01:27:28 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-06-08 01:27:28 +0200
commitfcc166d3a6e235933e823e82e1fcf6160a32a5d3 (patch)
tree8dc9adad3d5f405be47da68e0d0dd55b13897598 /git/util.py
parentc3b7263e0bb9cc1d94e483e66c1494e0e7982fd1 (diff)
downloadgitpython-fcc166d3a6e235933e823e82e1fcf6160a32a5d3.tar.gz
log: non-existing logs no longer throw an exception, but are ignored. Fixed critical bug which caused packed-ref files to be written with native line endings, which made git fail to parse it. I wonder why I never noticed this before, or ignored it. Unbelievable \!
Diffstat (limited to 'git/util.py')
-rw-r--r--git/util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/git/util.py b/git/util.py
index 0492b63c..00085ae0 100644
--- a/git/util.py
+++ b/git/util.py
@@ -47,12 +47,15 @@ def join_path(a, *p):
'/' instead of possibly '\' on windows."""
path = a
for b in p:
+ if len(b) == 0:
+ continue
if b.startswith('/'):
path += b[1:]
elif path == '' or path.endswith('/'):
path += b
else:
path += '/' + b
+ # END for each path token to add
return path
def to_native_path_windows(path):