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

This commit is contained in:
William Richard
2021-10-25 11:35:19 -04:00
parent a14d9cb6ea
commit 98bd0ae149

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