summaryrefslogtreecommitdiff
path: root/plugins/git-prompt
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-12-16 22:13:45 -0700
committerTuowen Zhao <ztuowen@gmail.com>2020-12-16 22:13:45 -0700
commitfb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5 (patch)
treedd7746c9910755dfeb5bf28bda68e28b47d5771f /plugins/git-prompt
parent3aaa0bc62ece494dd2b6e47a191de79e562156f9 (diff)
parentb28665aebb4c1b07a57890eb59551bc51d0acf37 (diff)
downloadzsh-fb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5.tar.gz
zsh-fb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5.tar.bz2
zsh-fb45741fc1dbd40dd2be72bc35a28c6ee8f3f7a5.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/git-prompt')
-rw-r--r--plugins/git-prompt/gitstatus.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py
index 300365d71..bf3173614 100644
--- a/plugins/git-prompt/gitstatus.py
+++ b/plugins/git-prompt/gitstatus.py
@@ -11,11 +11,11 @@ def get_tagname_or_hash():
"""return tagname if exists else hash"""
# get hash
hash_cmd = ['git', 'rev-parse', '--short', 'HEAD']
- hash_ = check_output(hash_cmd).strip()
+ hash_ = check_output(hash_cmd).decode('utf-8').strip()
# get tagname
tags_cmd = ['git', 'for-each-ref', '--points-at=HEAD', '--count=2', '--sort=-version:refname', '--format=%(refname:short)', 'refs/tags']
- tags = check_output(tags_cmd).split()
+ tags = check_output(tags_cmd).decode('utf-8').split()
if tags:
return tags[0] + ('+' if len(tags) > 1 else '')