summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2014-11-19 16:22:29 +0100
committerSebastian Thiel <byronimo@gmail.com>2014-11-19 16:22:29 +0100
commit88a7002acb50bb9b921cb20868dfea837e7e8f26 (patch)
tree15d323e5c8b1cb230e1e3702dcf6f02328ed7d35
parent1234a1077f24ca0e2f1a9b4d27731482a7ed752b (diff)
downloadgitpython-88a7002acb50bb9b921cb20868dfea837e7e8f26.tar.gz
Fixes https://github.com/gitpython-developers/GitPython/issues/130
-rw-r--r--git/refs/symbolic.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 1470c879..1e361244 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -129,7 +129,9 @@ class SymbolicReference(object):
fp = open(join(repo.git_dir, ref_path), 'r')
value = fp.read().rstrip()
fp.close()
- tokens = value.split(" ")
+ # Don't only split on spaces, but on whitespace, which allows to parse lines like
+ # 60b64ef992065e2600bfef6187a97f92398a9144 branch 'master' of git-server:/path/to/repo
+ tokens = value.split()
except (OSError, IOError):
# Probably we are just packed, find our entry in the packed refs file
# NOTE: We are not a symbolic ref if we are in a packed file, as these