From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH 2/2] git-request-pull: open-code the only invocation of get_remote_url
Date: Tue, 1 Mar 2011 10:21:37 +0100 [thread overview]
Message-ID: <1298971297-20326-2-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20110301084110.GT22310@pengutronix.de>
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>
---
git-parse-remote.sh | 4 ----
git-request-pull.sh | 3 +--
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 0ab1192..e7013f7 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -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")
diff --git a/git-request-pull.sh b/git-request-pull.sh
index 6fdea39..fc080cc 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -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
--
1.7.2.3
prev parent reply other threads:[~2011-03-01 9:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 9:06 bug: request-pull broken when remote name contains a slash Uwe Kleine-König
2011-01-14 11:36 ` [PATCH] fix git-parse-remote.sh for remotes that contain slashes Stefan Naewe
2011-01-14 19:55 ` Junio C Hamano
2011-02-28 9:36 ` [PATCH] get_remote_url(): use the same data source as ls-remote to get remote urls Uwe Kleine-König
2011-02-28 23:38 ` Junio C Hamano
2011-03-01 8:41 ` Uwe Kleine-König
2011-03-01 9:21 ` [PATCH 1/2] " Uwe Kleine-König
2011-03-01 9:21 ` Uwe Kleine-König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298971297-20326-2-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kernel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).