Skip to content

Commit

Permalink
aliases: git: Don't use sed for extracting branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
royatt committed Dec 5, 2022
1 parent 40d6ef8 commit 949309d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aliases/available/git.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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/}
}

0 comments on commit 949309d

Please sign in to comment.