From 280c99dae691e468d12c94f64c97964b88cdad4e Mon Sep 17 00:00:00 2001 From: ZigZagT Date: Thu, 5 Jan 2023 15:03:12 -0800 Subject: [PATCH] feat(git): accept `default` and `mainline` as main branches (#11431) --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 69745730c..76e58a121 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -31,7 +31,7 @@ function work_in_progress() { 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}; do + for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; do if command git show-ref -q --verify $ref; then echo ${ref:t} return