From: Franck Bui-Huu Date: Sun, 10 Sep 2006 19:02:10 GMT Subject: Re: [PATCH 1/2] archive: allow remote to have more formats than we understand. Message-ID: In-Reply-To: <7vpse4tcyc.fsf@assigned-by-dhcp.cox.net> 2006/9/10, Junio C Hamano : > This fixes git-archive --remote not to parse archiver arguments; > otherwise if the remote end implements formats other than the > one known locally we will not be able to access that format. > > Signed-off-by: Junio C Hamano > --- > * At first sight, this should not matter that much, but (1) we > do not really parse and validate the arguments when dealing > with remote site, and (2) we have no way validating them if > we wanted to, given that the remote end might be running > different version of git. > > Having said that, you would realize that once we start > refactoring things this way, "git archive --remote=foo" is > not archive driver anymore. There is nothing that prevents > us saying "git archive --remote=foo --command=rev-list HEAD", > other than that the remote archive protocol insists the > command invoked at the remote end to be "git archive" itself. > good change. > archive.h | 1 - > builtin-archive.c | 79 ++++++++++++++++++++++++++++++++--------------------- > 2 files changed, 47 insertions(+), 33 deletions(-) > [snip] > return i; > } > > +static const char *remote_request(int *ac, const char **av) > +{ just to be consistent with the rest of the file, I would have called this function "parse_remote_arg" or "extract_remote_arg" -- Franck