fix pack exclusion via an ancestor commit
commit88b16410211fb0741a604736b34531fe3d56b8fd
authorStefan Sperling <stsp@stsp.name>
Tue, 28 Jan 2025 09:00:54 +0000 (28 09:00 +0000)
committerThomas Adam <thomas@xteddy.org>
Thu, 30 Jan 2025 18:04:18 +0000 (30 18:04 +0000)
treeba8e3e2db5a758e9bf11b983bbbb11abab7e2eee
parent81a1b9add11a52cde9675b1a2c85cae35e644418
fix pack exclusion via an ancestor commit

When a commit is first discovered as a commit which should be included
in the pack, but is later found to be a parent of a commit which should
be excluded from the pack, gotadmin pack correctly excluded the commit
itself but failed to exclude this commit's parents.

This bug is the reason why our test suite did not notice that gotd
was not protecting references when clients did not send a pack file.
In our test case, these parents are in the 'keep' set already and
were never added to the 'skip' set. A useless pack was built which
included those parents and nothing else.

Add a test which triggers the bug via gotadmin pack.

ok jamsek
lib/got_lib_pack_create.h
lib/pack_create.c
lib/pack_create_io.c
lib/pack_create_privsep.c
regress/cmdline/pack.sh