[PATCH] Ask for "git program" when asking for "git-program" over SSH connection
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2008, 03:26 UTC
- Message-ID
- <7vprq66vqd.fsf_-_@gitster.siamese.dyndns.org>
- In-Reply-To
- <7v1w2m8ahi.fsf@gitster.siamese.dyndns.org>
The daemon expects to see the dashed form and we cannot change older servers. But when invoking programs on the remote end over SSH, the command line the client side build is under client's control.
Signed-off-by: Junio C Hamano <gitster@pobox.com> --- * This I haven't even compile tested at all, but it feels right. We probably should do this before bindir=>libexecdir move; as long as this is in place on the client side the version running on the server end should not matter.
connect.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/connect.c b/connect.c index e92af29..fd1da26 100644 --- a/connect.c +++ b/connect.c @@ -589,6 +589,10 @@ struct child_process *git_connect(int fd[2], const char *url_orig, conn = xcalloc(1, sizeof(*conn)); strbuf_init(&cmd, MAX_CMD_LEN); + if (protocol != PROTO_GIT && !strncmp(prog, "git-", 4)) { + strbuf_addstr(&cmd, "git "); + prog += 4; + } strbuf_addstr(&cmd, prog); strbuf_addch(&cmd, ' '); sq_quote_buf(&cmd, path);
-- 1.5.6.56.g29b0d