On Tue, Apr 18, 2023 at 03:18:46PM -0400, Taylor Blau wrote: > This allows `string_list_split_in_place()` to overwrite any existing > entries without needing to free and re-allocate them. > > However, setting `list->nr` manually is not safe in all instances. There > are a couple of cases worth worrying about: > [...] Thanks for adding this patch. Your explanation very nicely covers why this is a reasonable pattern, and what pitfalls we're worried about by doing it inline. > Co-authored-by: Jeff King <peff@xxxxxxxx> > Signed-off-by: Jeff King <peff@xxxxxxxx> Acking my forged sign-off. :) -Peff