pack-objects: fix handling of multiple --filter options
commit825babe5d5c720cb196f4f12c8eeb15fe00e95a1
authorRené Scharfe <l.s.r@web.de>
Tue, 29 Nov 2022 12:23:53 +0000 (29 13:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Nov 2022 01:00:33 +0000 (30 10:00 +0900)
treee22d6958c4d81df1ec86534b1e944743488fc1ce
parentf00d81153336e1d560288c5f698aada3ca507dba
pack-objects: fix handling of multiple --filter options

Since 5cb28270a1 (pack-objects: lazily set up "struct rev_info", don't
leak, 2022-03-28) --filter options given to git pack-objects overrule
earlier ones, letting only the leftmost win and leaking the memory
allocated for earlier ones.  Fix that by only initializing the rev_info
struct once.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
t/t5317-pack-objects-filter-objects.sh