浏览代码

feat(git): support `stable` in `git_main_branch` (#12447)

Jesús Miguel Benito Calzada 11 月之前
父节点
当前提交
1b29fd3a46
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/git/git.plugin.zsh

+ 1 - 1
plugins/git/git.plugin.zsh

@@ -35,7 +35,7 @@ function git_develop_branch() {
 function git_main_branch() {
   command git rev-parse --git-dir &>/dev/null || return
   local ref
-  for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default,master}; do
+  for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default,stable,master}; do
     if command git show-ref -q --verify $ref; then
       echo ${ref:t}
       return 0