From 88a7002acb50bb9b921cb20868dfea837e7e8f26 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 19 Nov 2014 16:22:29 +0100 Subject: Fixes https://github.com/gitpython-developers/GitPython/issues/130 --- git/refs/symbolic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git/refs/symbolic.py') 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 -- cgit v1.2.1