From: Junio C Hamano Date: Sun, 18 Dec 2022 02:42:19 GMT Subject: Re: [PATCH] am: don't pass strvec to apply_parse_options() Message-ID: In-Reply-To: Jeff King writes: >> 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.