зеркало из https://github.com/microsoft/git.git
git-request-pull: open-code the only invocation of get_remote_url
So sh:get_remote_url can go now and git-request-pull doesn't need to source git-parse-remote. anymore. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
45781adb9a
Коммит
1a92777504
|
@ -4,10 +4,6 @@
|
|||
# this would fail in that case and would issue an error message.
|
||||
GIT_DIR=$(git rev-parse -q --git-dir) || :;
|
||||
|
||||
get_remote_url () {
|
||||
git ls-remote --get-url "$1"
|
||||
}
|
||||
|
||||
get_default_remote () {
|
||||
curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
|
||||
origin=$(git config --get "branch.$curr_branch.remote")
|
||||
|
|
|
@ -15,7 +15,6 @@ p show patch text as well
|
|||
'
|
||||
|
||||
. git-sh-setup
|
||||
. git-parse-remote
|
||||
|
||||
GIT_PAGER=
|
||||
export GIT_PAGER
|
||||
|
@ -55,7 +54,7 @@ branch=$(git ls-remote "$url" \
|
|||
p
|
||||
q
|
||||
}")
|
||||
url=$(get_remote_url "$url")
|
||||
url=$(git ls-remote --get-url "$url")
|
||||
if [ -z "$branch" ]; then
|
||||
echo "warn: No branch of $url is at:" >&2
|
||||
git log --max-count=1 --pretty='tformat:warn: %h: %s' $headrev >&2
|
||||
|
|
Загрузка…
Ссылка в новой задаче