Re: [PATCH v2] builtin/help.c: move strbuf out of help loops
- From
Amisha Chhajed <amishhhaaaa@gmail.com>
- Date
- Mar 11, 2026, 19:30 UTC
- Message-ID
- <CAPvEtrd9Yri5LQu9DiMAO4EDquyd-JxwNBGn+h=+=E+oKJ2ERw@mail.gmail.com>
- In-Reply-To
- <CAGWgyh_dJX7TteKjwVXUwnmUL5kmZifpA0a4n1RiwRvCBEY5gw@mail.gmail.com>
Show 7 quoted lines
> After looking at the refactor of list_config_help() in the > other active thread, I agree that my optimization is no longer > necessary. > > Amisha's new structure with set_config_vars() and set_config_sections() > is much cleaner. Since the logic is now encapsulated in these helpers, > my proposed changes would not be applicable.
I feel removing out the strbuf initialisation and release out of the loop is still applicable, I have added all the parts in v5 which were not fixed by my improvements and tagged you, check it out here https://lore.kernel.org/git/20260311192151.60489-1-amishhhaaaa@gmail.com/
-- Thanks, Amisha