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

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:50

Possibly related (same subject, not in this thread)

"Shawn O. Pearce" [off-list ref] writes:
Junio C Hamano [off-list ref] wrote:
quoted
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.
By the way I looked at gitosis (Tommi CC'ed).

    http://repo.or.cz/w/gitosis.git?a=blob;f=gitosis/serve.py;h=c0b7135bf45305ee1079b0dcab3b4ed1ce988aab;hb=38561aa6a51a2ef6cc04aa119481df62d213ffa4

In gitosis/serve.py, there are COMMANDS_READONLY and COMMANDS_WRITE array
that holds 'git-upload-pack' and 'git-receive-pack' commands, and they are
compared with user commands after doing:

	verb, args = command.split(None, 1)

(and "verb" is looked up in the set of valid commands).  It should not be
too involved to notice verb is 'git' and then re-split the args part to
see if they are upload-pack/receive-pack, which would be the equivalent
change to this patch.  It needs to be done before the clients are
updated.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help