mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
feat(git): accept default and mainline as main branches (#11431)
This commit is contained in:
@@ -31,7 +31,7 @@ function work_in_progress() {
|
|||||||
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}; do
|
for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; 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
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user