When no upstream is configured, the script behaves as if push.default=current

master
Patrick de Kok 13 years ago
parent 8a2060598b
commit 7d1a6e495e
  1. 4
      gitstatus.py

@ -46,6 +46,10 @@ else:
remote_name = Popen(['git','config','branch.%s.remote' % branch], stdout=PIPE).communicate()[0].strip() remote_name = Popen(['git','config','branch.%s.remote' % branch], stdout=PIPE).communicate()[0].strip()
if remote_name: if remote_name:
merge_name = Popen(['git','config','branch.%s.merge' % branch], stdout=PIPE).communicate()[0].strip() merge_name = Popen(['git','config','branch.%s.merge' % branch], stdout=PIPE).communicate()[0].strip()
else:
remote_name = "origin"
merge_name = "refs/heads/%s" % branch
if remote_name == '.': # local if remote_name == '.': # local
remote_ref = merge_name remote_ref = merge_name
else: else:

Loading…
Cancel
Save