parse-remote: replace unnecessary sed invocation

Just use parameter expansion instead.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stephen Boyd 2011-03-30 01:48:40 -07:00 committed by Junio C Hamano
parent 90cff968b3
commit 9ecd3ada6d

View File

@ -55,7 +55,8 @@ get_remote_url () {
}
get_default_remote () {
curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
curr_branch=$(git symbolic-ref -q HEAD)
curr_branch="${cur_branch#refs/heads/}"
origin=$(git config --get "branch.$curr_branch.remote")
echo ${origin:-origin}
}