git/query: process full contents of queue, even with skips

When skipping objects, we need to process the full queue,
because some of the objects in the queue may have already
been painted with keep. This can cost a small amount of time,
but should not need to advance the frontier by more than
one object, so the additional time should be proportional
to the spread of the graph.
This commit is contained in:
Ori Bernstein 2024-09-16 22:48:02 +00:00
parent d9edee8b1a
commit 0636bfc774

View file

@ -159,7 +159,7 @@ paint(Hash *head, int nhead, Hash *tail, int ntail, Object ***res, int *nres, in
}
dprint(1, "finding twixt commits\n");
while(nskip != objq.nheap && qpop(&objq, &e)){
while(objq.nheap != 0 && qpop(&objq, &e)){
if(e.color == Skip)
nskip--;
if(oshas(&skip, e.o->hash))