Style-nit: Parens here around !p.has(BOUNDARY) are not necessary.

Doesn't this NPE when BOUNDARY wasn't allocated by DepthRevWalk? I guess you assume it cannot since DepthRevWalk overrides markUninteresting() to do nothing and therefore you assume UNINTERESTING can never be set on a RevCommit?

I'm a little skeptical of using that as the method to determine if BOUNDARY is null or not.