Linus Torvalds [off-list ref] writes:
It does:
struct commit *commit = pop_one_commit(list_p);
int still_interesting = !!interesting(*list_p);
in that order: it looks whether there are any interesting commits left
_after_ it has popped the top-of-stack.
Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh. You are right.
The problem is most of the time hidden, because we usually do
one extra round (extra usually starts from 0 and we break out
after we say "not interesting anymore" and extra < 0).
Obviously, I was not thinking clearly.