summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZigZagT <i@zhangtao.cool>2023-01-05 15:03:12 -0800
committerGitHub <noreply@github.com>2023-01-06 00:03:12 +0100
commit280c99dae691e468d12c94f64c97964b88cdad4e (patch)
tree2806e03777018906a06b8fd6006fe00c64afdf0b
parent3fca9c8933afc5c118a73cedb171a3c7b8e92730 (diff)
downloadzsh-280c99dae691e468d12c94f64c97964b88cdad4e.tar.gz
zsh-280c99dae691e468d12c94f64c97964b88cdad4e.tar.bz2
zsh-280c99dae691e468d12c94f64c97964b88cdad4e.zip
feat(git): accept `default` and `mainline` as main branches (#11431)
-rw-r--r--plugins/git/git.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
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