diff options
| author | Jeff King <peff@peff.net> | 2026-02-19 08:57:52 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-19 10:41:18 -0800 |
| commit | 6375a00ef16071eadbb383bd9915e277ef304bfe (patch) | |
| tree | 7516ef49d564cdd0b72d29a7ceb2c777a5b1c736 /contrib/persistent-https | |
| parent | 9e86e1a05b032d712658bbe70231447455f83fb6 (diff) | |
| download | git-6375a00ef16071eadbb383bd9915e277ef304bfe.tar.gz git-6375a00ef16071eadbb383bd9915e277ef304bfe.zip | |
bisect: simplify string_list memory handling
We declare the refs_for_removal string_list as NODUP, forcing us to
manually allocate strings we insert. And then when it comes time to
clean up, we set strdup_strings so that string_list_clear() will free
them for us.
This is a confusing pattern, and can be done much more simply by just
declaring the list with the DUP initializer in the first place.
It was written this way originally because one of the callsites
generated the item using xstrfmt(). But that spot switched to a plain
xstrdup() in the preceding commit. That means we can now just let the
string_list code handle allocation itself.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
