0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

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

This commit is contained in:
Jesús Miguel Benito Calzada 2024-05-23 12:51:02 +02:00 committed by GitHub
parent 203369b0f9
commit 1b29fd3a46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,7 +35,7 @@ function git_develop_branch() {
function git_main_branch() { function git_main_branch() {
command git rev-parse --git-dir &>/dev/null || return command git rev-parse --git-dir &>/dev/null || return
local ref 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 if command git show-ref -q --verify $ref; then
echo ${ref:t} echo ${ref:t}
return 0 return 0