Merge pull request #1981 from william-richard/make-default-branch-match-exactly-main

Look for branches that are literally the word main
pull/1986/head
Noah Gorny 2021-11-16 20:09:22 +02:00 committed by GitHub
commit 447c89aa0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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\s*$'; then
echo main
else
echo master