Private GIT

Skip to content
Snippets Groups Projects
Commit d8e07580 authored by Nic Wolfe's avatar Nic Wolfe
Browse files

Merge pull request #375 from Manganeez/development

Better GitUpdateManager._find_git_branch()
parents 8a7ae89b 37ee796f
No related branches found
No related tags found
No related merge requests found
...@@ -286,16 +286,7 @@ class GitUpdateManager(UpdateManager): ...@@ -286,16 +286,7 @@ class GitUpdateManager(UpdateManager):
def _find_git_branch(self): def _find_git_branch(self):
output, err = self._run_git('branch --no-color') #@UnusedVariable return self._run_git('symbolic-ref -q HEAD')[0].strip().replace('refs/heads/', '', 1) or 'master'
if not output:
return 'master'
for cur_line in output.splitlines():
if cur_line.startswith('*'):
return cur_line[2:]
return 'master'
def _check_github_for_update(self): 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