Re: [PATCH] am: don't pass strvec to apply_parse_options()
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
>> Making a shallow copy to give to parse_options() in callers that currently
>> pass a strvec directly or indirectly seems like the simplest solution to
>> me for now.
>
> Yes, I thought your original patch actually got to the root of the
> problem. strvec owns the array and its elements, and parse-options wants
> to munge the array itself (but not the elements). Making a shallow copy
> is eliminates the conflict over ownership.
Yup, it did look very sensible to me.