Re: [PATCH v2 05/25] sequencer: allow the sequencer to take custody of malloc()ed data
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 12, 2016, 19:46 UTC
- Message-ID
- <xmqqzinc295y.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <942aa559a0af9b52e079c5c78fa313f49b87d50d.1473590966.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 14 quoted lines
> The sequencer is our attempt to lib-ify cherry-pick. Yet it behaves
> like a one-shot command when it reads its configuration: memory is
> allocated and released only when the command exits.
>
> This is kind of okay for git-cherry-pick, which *is* a one-shot
> command. All the work to make the sequencer its work horse was
> done to allow using the functionality as a library function, though,
> including proper clean-up after use.
>
> This patch introduces an API to pass the responsibility of releasing
> certain memory to the sequencer. Example:
>
> const char *label =
> sequencer_entrust(opts, xstrfmt("From: %s", email));I thought we (not just me) were already pretty clear during the last round of review that we will not want this entrust() thing.