summaryrefslogtreecommitdiff
path: root/updateGit.py
diff options
context:
space:
mode:
Diffstat (limited to 'updateGit.py')
-rwxr-xr-xupdateGit.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/updateGit.py b/updateGit.py
index de1bbc5..648176b 100755
--- a/updateGit.py
+++ b/updateGit.py
@@ -53,7 +53,6 @@ def findChanges(statusoutput):
def updatePath(path):
friendly_path = os.path.basename(path)
dPrint('Repository:', path)
- head = getGitStdout(path, 'rev-parse --abbrev-ref HEAD')
changed = findChanges(getGitStdout(path, 'status --porcelain'))
cur_branch = getGitStdout(path, 'rev-parse --abbrev-ref HEAD')
@@ -126,7 +125,7 @@ def updatePath(path):
# print('Safe branch:', safe_branch)
# Checkout master, if detached HEAD and not proceeded
- if head == 'HEAD':
+ if cur_branch == 'HEAD':
if changed:
print('[%s] Head detached, but changes found. Stash them to checkout %s.' % (
friendly_path,