Re: [PATCH] Ask for "git program" when asking for "git-program" over SSH connection

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shawn O. Pearce
Date: Tuesday, June 24, 2008 - 10:34 pm

Junio C Hamano <gitster@pobox.com> wrote:

Shouldn't "git upload-pack" work on the server side as far back as
0.99.9k?  That's back really old.  And my patch fixed "git " to be
"git-" when talking to git-daemon, thus keeping clients compatible
with all current git:// servers.

For SSH servers that can't handle "git upload-pack" the user can
change it to --upload-pack=git-upload-pack and get back to the
old behavior, until the server operator can upgrade.

Your patch doesn't offer that work around on the client side.
 

Check my change in git_connect again:

diff --git a/connect.c b/connect.c
index e92af29..dbabd93 100644
--- a/connect.c
+++ b/connect.c
@@ -576,8 +576,8 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
 		 * from extended components with a NUL byte.
 		 */
 		packet_write(fd[1],
-			     "%s %s%chost=%s%c",
-			     prog, path, 0,
+			     "git-%s %s%chost=%s%c",
+			     prog + 4, path, 0,
 			     target_host, 0);
 		free(target_host);
 		free(url);

Its buggy if the user tried to do "git ls-remote --upload-pack=crp git://"
but if this is the direction we want to go we can obviously work out a
better method of forcing "git " to be "git-" when talking to git-daemon.


Please tell me, where is git-upload-pack on repo.or.cz?

$ ssh repo.or.cz which git-upload-pack
fatal: unrecognized command 'which git-upload-pack'

I doubt I can pass it '/usr/local/bin/git-upload-pack' and get it
to work too.  So I don't think this is a good work around.

Obviously pasky will fix repo.or.cz to accept both at some point
in the near future, likely before 1.6.0 releases, because he's cool
like that.  Not everyone is.

Please don't make 1.6.0 unavailable to end-users because their
server operator can't currently accept "git upload-pack" without
giving them a workaround to force "git-upload-pack" over SSH.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Keep some git-* programs in $(bindir), Junio C Hamano, (Tue Jun 24, 8:22 pm)
Re: [PATCH] Keep some git-* programs in $(bindir), Shawn O. Pearce, (Tue Jun 24, 9:17 pm)
Re: [PATCH] Keep some git-* programs in $(bindir), Daniel Barkalow, (Tue Jun 24, 9:19 pm)
Re: [PATCH] Keep some git-* programs in $(bindir), Shawn O. Pearce, (Tue Jun 24, 9:37 pm)
Re: [PATCH] Ask for "git program" when asking for "git-pro ..., Shawn O. Pearce, (Tue Jun 24, 10:34 pm)