aliases: git: Don't use sed for extracting branch name

pull/2176/head
Roy Attias 2022-12-04 17:35:44 +02:00 committed by Roy Attias
parent 40d6ef83d6
commit 949309d9d4
1 changed files with 2 additions and 1 deletions

View File

@ -201,5 +201,6 @@ function gdv() {
}
function get_default_branch() {
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
branch=$(git symbolic-ref refs/remotes/origin/HEAD)
${branch#refs/remotes/origin/}
}