Use `/b` to find the default branch, instead of start/end of line

pull/1981/head
William Richard 2021-10-25 11:35:19 -04:00
parent a14d9cb6ea
commit 98bd0ae149
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 '^main$'; then
if git branch | grep -q '\main\b'; then
echo main
else
echo master