浏览代码

grab last item in list which is the branch instead of relying on position.

Chris Jones 11 年之前
父节点
当前提交
c397000b3b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/git-prompt/gitstatus.py

+ 1 - 1
plugins/git-prompt/gitstatus.py

@@ -67,7 +67,7 @@ if bline.find('Not currently on any branch') != -1:
         '--short',
         'HEAD'], stdout=PIPE).communicate()[0][:-1]
 else:
-    branch = bline.split(' ')[3]
+    branch = bline.split(' ')[-1]
     bstatusline = lines[1]
     match = behead_re.match(bstatusline)
     if match: