diff options
author | Stephen Boyd <bebarino@gmail.com> | 2011-03-30 01:48:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-30 11:42:08 -0700 |
commit | 9ecd3ada6dd7fe80109c48c48f30164c066d37ad (patch) | |
tree | dda822f1b29dc6f1fd45bfcf18acdd0a8e4c409d /git-parse-remote.sh | |
parent | 90cff968b3757061914f83b85a8d58cb9f29e72a (diff) | |
download | git-9ecd3ada6dd7fe80109c48c48f30164c066d37ad.tar.gz |
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>
Diffstat (limited to 'git-parse-remote.sh')
-rw-r--r-- | git-parse-remote.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 1cc2ba6e09..d3782d9559 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -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} } |