Re: [PATCH 1/2] archive: allow remote to have more formats than we understand.
- From
- Franck Bui-Huu <vagabon.xyz@gmail.com>
- Date
- Sep 10, 2006, 19:02 UTC
- Message-ID
- <cda58cb80609101202y2ee1a18dwf09d6e104740777@mail.gmail.com>
- In-Reply-To
- <7vpse4tcyc.fsf@assigned-by-dhcp.cox.net>
2006/9/10, Junio C Hamano <junkio@cox.net>:
Show 19 quoted lines
> 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 <junkio@cox.net> > --- > * 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]
Show 5 quoted lines
> 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