mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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:
parent
90cff968b3
commit
9ecd3ada6d
|
@ -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}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue