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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
> > "Shawn O. Pearce" <spearce@xxxxxxxxxxx> writes:
> >
> >>> Any other suggestions that is workable?
> >>
> >> diff --git a/builtin-clone.c b/builtin-clone.c
> >> index 5c5acb4..98d0f0f 100644
> >> --- a/builtin-clone.c
> >> +++ b/builtin-clone.c
> >> @@ -37,7 +37,7 @@ static int option_quiet, option_no_checkout, option_bare;
> >
> > << a patch to conditionally change "git-program" default to "git program"
> > snipped >>

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.
 
> Typofix: s/cond/uncond/;
> 
> > How would that help client that talk with git-daemon, unlike what I sent
> > earlier?

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.

> If we force --upload-pack workaround to _everybody_ we are already lost.
> 
> Also I think the previous one still lets you work it around by giving a
> full path, like "/usr/local/bin/git-upload-pack", because "/usr" does not
> match "git-" ;-)

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux