|
|
|
|
@ -64,7 +64,7 @@ staged = str(nb_staged) |
|
|
|
|
conflicts = str(nb_U) |
|
|
|
|
changed = str(nb_changed) |
|
|
|
|
status_lines = Popen(['git','status','-s','-uall'],stdout=PIPE).communicate()[0].splitlines() |
|
|
|
|
untracked_lines = [a for a in status_lines if a.startswith("??")] |
|
|
|
|
untracked_lines = [a for a in map(lambda s: s.decode('utf-8'), status_lines) if a.startswith("??")] |
|
|
|
|
nb_untracked = len(untracked_lines) |
|
|
|
|
untracked = str(nb_untracked) |
|
|
|
|
stashes = Popen(['git','stash','list'],stdout=PIPE).communicate()[0].splitlines() |
|
|
|
|
@ -84,7 +84,7 @@ if not branch: # not on any branch |
|
|
|
|
if tag: # if we are on a tag, print the tag's name |
|
|
|
|
branch = tag |
|
|
|
|
else: |
|
|
|
|
branch = symbols['prehash']+ Popen(['git','rev-parse','--short','HEAD'], stdout=PIPE).communicate()[0][:-1] |
|
|
|
|
branch = symbols['prehash']+ Popen(['git','rev-parse','--short','HEAD'], stdout=PIPE).communicate()[0].decode('utf-8')[:-1] |
|
|
|
|
else: |
|
|
|
|
remote_name = Popen(['git','config','branch.%s.remote' % branch], stdout=PIPE).communicate()[0].strip() |
|
|
|
|
if remote_name: |
|
|
|
|
|