summaryrefslogtreecommitdiff
path: root/source_control
diff options
context:
space:
mode:
Diffstat (limited to 'source_control')
-rw-r--r--source_control/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/source_control/git.py b/source_control/git.py
index e556d708..0997be67 100644
--- a/source_control/git.py
+++ b/source_control/git.py
@@ -522,7 +522,7 @@ def get_head_branch(git_path, module, dest, remote, bare=False):
if is_not_a_branch(git_path, module, dest):
f.close()
f = open(os.path.join(repo_path, 'refs', 'remotes', remote, 'HEAD'))
- branch = f.readline().split('/')[-1].rstrip("\n")
+ branch = f.readline().split(' ')[-1].replace('refs/remotes/' + remote + '/','',1).rstrip("\n")
f.close()
return branch