mirror of
https://github.com/git/git.git
synced 2024-12-18 06:14:59 +08: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 New Issue
Block a user