Re: [PATCH 21/49] builtin/repack.c: factor our "generated_pack_install"

Taylor Blau
2025-10-07T20:26:29Z

On Tue, Sep 30, 2025 at 01:21:46AM +0200, Patrick Steinhardt wrote:
> On Sun, Sep 28, 2025 at 06:08:31PM -0400, Taylor Blau wrote:
>
> Is the "factor our" in the commit subject supposed to read "factor out"?

Oops, good catch ;-).

> > + for_each_string_list_item(item, &names)
> > + generated_pack_install((struct generated_pack *)item->util,
>
> This cast should be unnecessary, right? `item->util` is a void pointer,
> so C should do the cast implicitly.

It's unnecessary, but I dislike implicit casts from 'void*' to any other
type. This makes it clearer how we're supposed to interpret the value in
item->util, but I'm happy to change it to use the implicit cast if you
feel strongly about it.

Thanks,
Taylor