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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: しらいしななこ <nanako3@...>
Cc: Miklos Vajna <vmiklos@...>, <pclouds@...>, Johannes Schindelin <Johannes.Schindelin@...>, Pieter de Bie <pdebie@...>, <git@...>
Date: Tuesday, June 24, 2008 - 11:26 pm

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
--
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, 11:22 pm)
Re: [PATCH] Keep some git-* programs in $(bindir), Daniel Barkalow, (Wed Jun 25, 12:19 am)
Re: [PATCH] Keep some git-* programs in $(bindir), Shawn O. Pearce, (Wed Jun 25, 12:37 am)
Re: [PATCH] Keep some git-* programs in $(bindir), Shawn O. Pearce, (Wed Jun 25, 12:17 am)
[PATCH] Ask for "git program" when asking for "git-program" ..., Junio C Hamano, (Tue Jun 24, 11:26 pm)