Make the regex looking for the main branch match the entire line

This commit is contained in:
William Richard
2021-11-15 12:19:05 -05:00
parent daaab1b73d
commit 2a23598873

View File

@@ -199,7 +199,7 @@ function gdv() {
}
function get_default_branch() {
if git branch | grep -q '\smain\s'; then
if git branch | grep -q '^. main\s*$'; then
echo main
else
echo master