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

pull/1981/head
William Richard 2021-11-15 12:19:05 -05:00
parent daaab1b73d
commit 2a23598873
No known key found for this signature in database
GPG Key ID: ACD9DA4E735E6D14
1 changed files with 1 additions and 1 deletions

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