VisibleRefFilter: Fix short-circuiting when all refs visible
ProjectControl.allRefsVisibleExcept was confusingly named, and as a
result incorrectly used by VisibleRefFilter. The caller in
VisibleRefFilter was treating "except" as "check that the set of
visible refs is all refs, minus the refs in this set I'm passing."
However, the actual behavior was "check that the set of visible refs
is all refs, but ignore any permissions relating to refs in this set
I'm passing."
This means that VisibleRefFilter was erroneously removing
refs/meta/config from the result set in this fast path, even if
refs/meta/config was in fact visible. Fix this by double-checking
visibility of refs/meta/config before removing it.
Change-Id: I0b1af9a72b48548cb5be8e0af96dc05eb4b69dc1
3 files changed