Re: [PATCH] t5304: add a test for pruning with bitmaps
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Apr 20, 2019, 21:01 UTC
- Message-ID
- <78a60be8-414e-cd32-8eb2-36b47702c10d@gmail.com>
- In-Reply-To
- <20190420032435.GA3559@sigill.intra.peff.net>
On 4/19/2019 11:24 PM, Jeff King wrote:
Show 17 quoted lines
> Try running t5304 with this:
>
> diff --git a/reachable.c b/reachable.c
> index eba6f64e01..7ec73ef43f 100644
> --- a/reachable.c
> +++ b/reachable.c
> @@ -191,6 +191,8 @@ static int mark_object_seen(const struct object_id *oid,
> if (!obj)
> die("unable to create object '%s'", oid_to_hex(oid));
>
> + if (!(obj->flags & SEEN))
> + die("seen flag not already there");
> obj->flags |= SEEN;
> return 0;
> }
>
> which shows that we are indeed freshly setting SEEN on some objects.Good point! Thanks for clearing that up for me.
> Interestingly, I don't _think_ you can cause an object to get pruned > accidentally here, because:
[snip]
I appreciate the additional context that you gave (and I snipped). This makes me comfortable accepting this test as an exercise of the code (to guard against future changes that create failures like null-refs) and we will need to rely on the performance suite to catch issues like removing the SEEN markers that I had tested.
Thanks, -Stolee