Re: [RFC/PATCH 3/5] connect.c: connect to a remote service with some flags
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 1, 2015, 03:22 UTC
- Message-ID
- <xmqqmw3xh04x.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1425085318-30537-4-git-send-email-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 5 quoted lines
> If this is over git protocol, the flags is appended as the next > parameter after host=. If it's ssh, a new argument is appended to the > command line. > > None of the callers use this now though.
Replace "some flags" with something more meaningful, so that the reader can imagine what purpose this change is meant to serve.
I unfortunately cannot offer a good suggestion by guessing what it is at this point, as none of the callers use this at this step in the series.
Show 7 quoted lines
> + if (!service_flags) > + packet_write(fd[1], "%s %s%chost=%s%c", > + prog, path, 0, target_host, 0); > + else > + packet_write(fd[1], "%s %s%chost=%s%c%s%c", > + prog, path, 0, target_host, 0, > + service_flags, 0);
Is this meant to be consumed by daemon.c:parse_host_arg()? Doesn't it detect extra cruft after "host=<hostname>\0" and die with an "Invalid request"?