Subject: Re: [PATCH 16/22] sequencer: prepare for rebase -i's GPG settings

From: Junio C Hamano <[email-masked]>
Date: Wed, 31 Aug 2016 13:33:50 -0700

Jakub Narębski <[email-masked]> writes:

> Though xstrdup(buf.buf + 2) followed by strbuf_release(&buf) would
> make free(opts->gpg_sign) possible without crash.  That is we can
> work without *_entrust() mechanism at the cost of strdups.

Absolutely.

It is not like entrust() thing is free of allocation cost (it needs
to allocate an array of pointers to keep track of what to free) or
programmer's mental burden (you need to be careful what to entrust()
and what not to), so "at the cost of strdup(3)" is reasonable cost
of doing business in the way normal people expect the code to work.