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>
Uwe Kleine-König committed
Mar 1, 2011 at 10:21 UTC
1a92777504afc09e071d7d828e084e6a4dadfce2
2 files changed
+1
-6
git-parse-remote.sh
-4
@@ -4,10 +4,6 @@
4
# this would fail in that case and would issue an error message.
5
GIT_DIR=$(git rev-parse -q --git-dir) || :;
6
7
-get_remote_url () {
8
- git ls-remote --get-url "$1"
9
-}
10
-
7
get_default_remote () {
8
curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
9
origin=$(git config --get "branch.$curr_branch.remote")
git-request-pull.sh
+1
-2
@@ -15,7 +15,6 @@ p show patch text as well
15
'
16
17
. git-sh-setup
18
-. git-parse-remote
18
19
GIT_PAGER=
20
export GIT_PAGER
@@ -55,7 +54,7 @@ branch=$(git ls-remote "$url" \
54
p
55
q
56
}")
58
-url=$(get_remote_url "$url")
57
+url=$(git ls-remote --get-url "$url")
58
if [ -z "$branch" ]; then
59
echo "warn: No branch of $url is at:" >&2
60
git log --max-count=1 --pretty='tformat:warn: %h: %s' $headrev >&2