Private GIT

Skip to content
Snippets Groups Projects
Commit 37ee796f authored by Mike Nerone's avatar Mike Nerone
Browse files

More technically correct way to find git branch.

parent 8a7ae89b
No related branches found
No related tags found
No related merge requests found
......@@ -286,16 +286,7 @@ class GitUpdateManager(UpdateManager):
def _find_git_branch(self):
output, err = self._run_git('branch --no-color') #@UnusedVariable
if not output:
return 'master'
for cur_line in output.splitlines():
if cur_line.startswith('*'):
return cur_line[2:]
return 'master'
return self._run_git('symbolic-ref -q HEAD')[0].strip().replace('refs/heads/', '', 1) or 'master'
def _check_github_for_update(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment