Here is a series inspired by Jacob Vosmaer's recent patch to only traverse once through the longest common prefix of given ref-prefixes in ls-refs. Instead of a hand-rolled implementation, this uses the one written back in b31e2680c4 (ref-filter.c: find disjoint pattern prefixes, 2019-06-26). The first patch exposes that algorithm in refs.h, and the second patch uses the new function. If Jacob is happy with this direction, I'd suggest that we use this series as a replacement for his patch. Thanks in advance for your review. Taylor Blau (2): refs: expose 'for_each_fullref_in_prefixes' ls-refs.c: traverse longest common ref prefix ls-refs.c | 6 +++- ref-filter.c | 74 ++------------------------------------------ refs.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++ refs.h | 7 +++++ 4 files changed, 101 insertions(+), 73 deletions(-) -- 2.30.0.138.g6d7191ea01