Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH] daemon: accept "git program" as well

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:44:50

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] wrote:
This is a step to futureproof git-daemon to accept clients that
ask for "git upload-pack" and friends, instead of using the more
traditional dash-form "git-upload-pack".  By allowing both, it
makes the client side easier to handle, as it makes "git" the only
thing necessary to be on $PATH when invoking the remote command
directly via ssh.

Signed-off-by: Junio C Hamano <redacted>
Obviously correct.  Ack.  Thanks Junio.

quoted hunk ↗ jump to hunk
 So this obviously needs to be queued to 'maint' to be included in 1.5.6.1
 and 1.6.0.

 daemon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon.c b/daemon.c
index 63cd12c..621c567 100644
--- a/daemon.c
+++ b/daemon.c
@@ -586,7 +586,7 @@ static int execute(struct sockaddr *addr)
 	for (i = 0; i < ARRAY_SIZE(daemon_service); i++) {
 		struct daemon_service *s = &(daemon_service[i]);
 		int namelen = strlen(s->name);
-		if (!prefixcmp(line, "git-") &&
+		if ((!prefixcmp(line, "git-") || !prefixcmp(line, "git ")) &&
 		    !strncmp(s->name, line + 4, namelen) &&
 		    line[namelen + 4] == ' ') {
 			/*
-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help