All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Grennan <tgrennan@redback.com>
To: "Santi Béjar" <santi@agolina.net>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	"gitster@pobox.com" <gitster@pobox.com>
Subject: Re: [PATCH] Make "git request-pull" use the configured remote.REMOTE.uploadpack
Date: Tue, 28 Jul 2009 18:30:02 -0700	[thread overview]
Message-ID: <20090729013002.GM4850@redback.com> (raw)
In-Reply-To: <adf1fd3d0907281713t378440eamb39baae3be6d41c4@mail.gmail.com>

On Tue, Jul 28, 2009 at 05:13:30PM -0700, Santi Béjar wrote:
>2009/7/27 Tom Grennan <tgrennan@redback.com>:
>> git-request-pull.sh should use git-parse-remote:get_uploadpack() to
>> load a configured remote.REMOTE.uploadpack like "git remote show" and
>> "git fetch". This allows one to specify the path of git-upload-pack on
>> the remote side.
>
>Sorry, but I removed all unused functions from git-parse-remote in 62d955f
>(parse-remote: remove unused functions, 2009-06-12), and it is in
>v1.6.4-rc1. I don't think there is much problem reverting part of that commit,
>but I wonder if the problem is that "git ls-remote" does not read the
>remote.<remote>.uploadpack by itself as it reads the remote.<remote>.url.
>
>Santi

Thanks for the hint.

Yes, "git ls-remote" is retrieving remote.<remote>.uploadpack when
dest is a configured remote.  However, git-request-pull runs ls-remote
after converting its URL argument from remote.<remote>.url

The following works with v1.6.4-rc3-12-gdf73af5

If you wish, I'll submit an alternative patch.

-- 
TomG

diff --git a/git-request-pull.sh b/git-request-pull.sh
index 5917773..fd95bea 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -28,13 +28,13 @@ headrev=`git rev-parse --verify "$head"^0` || exit
 merge_base=`git merge-base $baserev $headrev` ||
 die "fatal: No commits in common between $base and $head"
 
-url=$(get_remote_url "$url")
 branch=$(git ls-remote "$url" \
 	| sed -n -e "/^$headrev	refs.heads./{
 		s/^.*	refs.heads.//
 		p
 		q
 	}")
+url=$(get_remote_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

  reply	other threads:[~2009-07-29  1:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27 21:02 [PATCH] Make "git request-pull" use the configured remote.REMOTE.uploadpack Tom Grennan
2009-07-29  0:13 ` Santi Béjar
2009-07-29  1:30   ` Tom Grennan [this message]
2009-07-29  5:05     ` Junio C Hamano

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=20090729013002.GM4850@redback.com \
    --to=tgrennan@redback.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=santi@agolina.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.