Make the regex looking for the main branch match the entire line
parent
daaab1b73d
commit
2a23598873
|
|
@ -199,7 +199,7 @@ function gdv() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_default_branch() {
|
function get_default_branch() {
|
||||||
if git branch | grep -q '\smain\s'; then
|
if git branch | grep -q '^. main\s*$'; then
|
||||||
echo main
|
echo main
|
||||||
else
|
else
|
||||||
echo master
|
echo master
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue