git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-remote: fixed missing .uploadpack usage for show command
@ 2009-06-25  9:00 Chris Frey
  2009-06-25 18:32 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Frey @ 2009-06-25  9:00 UTC (permalink / raw)
  To: git

When using 'git remote show <name>', the remote HEAD check
did not use the uploadpack configuration setting.

Signed-off-by: Chris Frey <cdfrey@foursquare.net>
---
 builtin-remote.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-remote.c b/builtin-remote.c
index 658d578..ec1f903 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -787,7 +787,7 @@ static int get_remote_ref_states(const char *name,
 	read_branches();
 
 	if (query) {
-		transport = transport_get(NULL, states->remote->url_nr > 0 ?
+		transport = transport_get(states->remote, states->remote->url_nr > 0 ?
 			states->remote->url[0] : NULL);
 		remote_refs = transport_get_remote_refs(transport);
 		transport_disconnect(transport);
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-remote: fixed missing .uploadpack usage for show command
  2009-06-25  9:00 [PATCH] git-remote: fixed missing .uploadpack usage for show command Chris Frey
@ 2009-06-25 18:32 ` Junio C Hamano
  2009-06-25 21:21   ` Chris Frey
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-06-25 18:32 UTC (permalink / raw)
  To: Chris Frey; +Cc: git

Chris Frey <cdfrey@foursquare.net> writes:

> When using 'git remote show <name>', the remote HEAD check
> did not use the uploadpack configuration setting.
>
> Signed-off-by: Chris Frey <cdfrey@foursquare.net>

Thanks.

"X did not use Y" may be a good statement of the fact.  From the patch
text it can be seen that a NULL used to be passed and the patch makes it
to pass states->remote instead, so "This patch make X use Y", even though
left unsaid in the message, can be seen.

But it does not answer a more important question.  How was it a problem
that "X did not use Y"?

People who followed a recent discussion know the answer to this question,
but ones who read this in the "git log" output 6 months down the line will
not.  Please make a habit of justifying the change by stating "why".

"X should have used Y because of such and such reasons, but it didn't.
Instead of showing the correct result W, it gave Z, which may happen to be
the same as W in default settings but otherwise is wrong."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] git-remote: fixed missing .uploadpack usage for show command
  2009-06-25 18:32 ` Junio C Hamano
@ 2009-06-25 21:21   ` Chris Frey
  2009-06-25 21:48     ` [PATCH] git-remote: fix " Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Frey @ 2009-06-25 21:21 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

For users pulling from machines with self compiled git installs,
in non-PATH locations, they can set the config option
remote.<name>.uploadpack to set the location of git-upload-pack.

When using 'git remote show <name>', the remote HEAD check
did not use the uploadpack configuration setting, and would stall.

In builtin-remote.c, the config setting is already loaded
with the call to remote_get(), so this patch passes that remote
along to transport_get().

Signed-off-by: Chris Frey <cdfrey@foursquare.net>
---

A possibly clearer description...


 builtin-remote.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-remote.c b/builtin-remote.c
index 658d578..ec1f903 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -787,7 +787,7 @@ static int get_remote_ref_states(const char *name,
 	read_branches();
 
 	if (query) {
-		transport = transport_get(NULL, states->remote->url_nr > 0 ?
+		transport = transport_get(states->remote, states->remote->url_nr > 0 ?
 			states->remote->url[0] : NULL);
 		remote_refs = transport_get_remote_refs(transport);
 		transport_disconnect(transport);
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-remote: fix missing .uploadpack usage for show command
  2009-06-25 21:21   ` Chris Frey
@ 2009-06-25 21:48     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-06-25 21:48 UTC (permalink / raw)
  To: Chris Frey; +Cc: git

Chris Frey <cdfrey@foursquare.net> writes:

> For users pulling from machines with self compiled git installs,
> in non-PATH locations, they can set the config option
> remote.<name>.uploadpack to set the location of git-upload-pack.
>
> When using 'git remote show <name>', the remote HEAD check
> did not use the uploadpack configuration setting, and would
> not use the configured program.
>
> In builtin-remote.c, the config setting is already loaded
> with the call to remote_get(), so this patch passes that remote
> along to transport_get().
>
> Signed-off-by: Chris Frey <cdfrey@foursquare.net>
> ---
>
> A possibly clearer description...

Thanks, much clearer.  Will queue, aiming to eventually merge to 'maint'.

Do you have tests to protect this fix from getting broken in the future by
other people?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-25 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-25  9:00 [PATCH] git-remote: fixed missing .uploadpack usage for show command Chris Frey
2009-06-25 18:32 ` Junio C Hamano
2009-06-25 21:21   ` Chris Frey
2009-06-25 21:48     ` [PATCH] git-remote: fix " Junio C Hamano

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).