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 4, 2022
1 parent 54cdf3a commit d9c339c
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 d9c339c

Please sign in to comment.