From: Paul Tan Date: Wed, 10 Jun 2015 07:11:01 GMT Subject: Re: [PATCH v2 02/19] parse-options-cb: implement parse_opt_pass_argv_array() Message-ID: In-Reply-To: On Wed, Jun 10, 2015 at 7:16 AM, Junio C Hamano wrote: > Almost the same comment as 01/19 applies to this comment. > > I think it makes good sense to have two variants, one that lets the > last one win and pass only that last one (i.e. 01/19) and the other > that accumulates them into an argv_array (i.e. this one). But it > feels iffy, given that the "acculate" version essentially creates an > array of (char *), to make "the last one wins, leaving a single > string" to use strbuf. I'd find it much more understandable if 01/19 > took (char **) as opt->value instead of a strbuf. I don't see how it feels iffy. The purpose of using strbufs (and argv_arrays) is to avoid error-prone manual memory management. > In any case, these two need to be added as a related pair to the API > documentation. Okay, I guess I could also add their macro functions as well. Thanks, Paul