Re: [PATCH 3/4] Build-in send-pack, with an API for other programs to call.
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Oct 30, 2007, 01:14 UTC
- Message-ID
- <20071030011401.GU14735@spearce.org>
- In-Reply-To
- <Pine.LNX.4.64.0710292049350.7357@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> wrote:
Show 10 quoted lines
> -int main(int argc, char **argv)
> +void setup_send_pack(struct send_pack_args *args)
> +{
> + receivepack = args->receivepack;
> + verbose = args->verbose;
> + send_all = args->send_all;
> + force_update = args->force_update;
> + use_thin_pack = args->use_thin_pack;
> + dry_run = args->dry_run;
> +}...
Show 9 quoted lines
> +struct send_pack_args {
> + const char *receivepack;
> + int verbose;
> + int send_all;
> + int force_update;
> + int use_thin_pack;
> + int dry_run;
> +};
> +Ick. How about doing what I did with builtin-fetch-pack.c which was to copy the args into a global "static struct fetch_pack_args" and make the struct a bitfield with these boolean items as ":1" rather than a full int?
-- Shawn.