Skip to content

Commit 88a7002

Browse files
committed
1 parent 1234a10 commit 88a7002

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎git/refs/symbolic.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def _get_ref_info(cls, repo, ref_path):
129129
fp = open(join(repo.git_dir, ref_path), 'r')
130130
value = fp.read().rstrip()
131131
fp.close()
132-
tokens = value.split(" ")
132+
# Don't only split on spaces, but on whitespace, which allows to parse lines like
133+
# 60b64ef992065e2600bfef6187a97f92398a9144 branch 'master' of git-server:/path/to/repo
134+
tokens = value.split()
133135
except (OSError, IOError):
134136
# Probably we are just packed, find our entry in the packed refs file
135137
# NOTE: We are not a symbolic ref if we are in a packed file, as these

0 commit comments

Comments
 (0)