pack-objects: fix error when same packfile is included and excluded
commit752b465c3c0fd7f503b50c326017b8b13af83c3b
authorPatrick Steinhardt <ps@pks.im>
Fri, 14 Apr 2023 06:01:54 +0000 (14 08:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Apr 2023 17:27:51 +0000 (14 10:27 -0700)
treec4147890cb3bef22549dfdca55271c6857189b54
parent732194b5f2ff50fc536b28c3d5a3e43e0110419b
pack-objects: fix error when same packfile is included and excluded

When passing the same packfile both as included and excluded via the
`--stdin-packs` option, then we will return an error because the
excluded packfile cannot be found. This is because we will only set the
`util` pointer for the included packfile list if it was found, so that
we later die when we notice that it's in fact not set for the excluded
packfile list.

Fix this bug by always setting the `util` pointer for both the included
and excluded list entries.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
t/t5331-pack-objects-stdin.sh