浏览代码

walle 2.1 - fix: #705 分支列表只返回了 elease

walle 6 年之前
父节点
当前提交
2ab8a8ce8b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      walle/service/git/repo.py

+ 2 - 1
walle/service/git/repo.py

@@ -90,7 +90,8 @@ class Repo:
         # 去除 origin/HEAD -> 当前指向
         # 去除远端前缀
         branches = PyRepo(self.path).remote().refs
-        return [str(branch).strip().lstrip('origin/') for branch in branches if
+        # fixbug https://github.com/meolu/walle-web/issues/705
+        return [str(branch).strip().lstrip('origin').lstrip('/') for branch in branches if
                 not str(branch).strip().startswith('origin/HEAD')]
 
     def tags(self):