1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-21 15:30:09 +00:00

feat(git): accept default and mainline as main branches (#11431)

This commit is contained in:
ZigZagT 2023-01-05 15:03:12 -08:00 committed by GitHub
parent 3fca9c8933
commit 280c99dae6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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