提交 9ecd3ada 编写于 作者: S Stephen Boyd 提交者: Junio C Hamano

parse-remote: replace unnecessary sed invocation

Just use parameter expansion instead.
Signed-off-by: NStephen Boyd <bebarino@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 90cff968
......@@ -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}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册