On Mon, Oct 21, 2024 at 07:36:55AM -0500, karthik nayak wrote: > > Mh. So we do end up using `refs_for_each_fullref_in_prefixes()`, which > > may or may not end up collapsing the prefixes. We do sort and dedup the > > prefixes via `find_longest_prefixes()`, so we don't have to worry about > > e.g. `git for-each-ref refs/tags refs/heads refs/tags`. > > Tangent: This sent me down a rabbit hole, I wonder if we can do better > with naming, `find_longest_prefixes` calls `find_longest_prefixes_1`, > The `_1` doesn't help at all with explaining what the function does. > > [snip] This is actually one of the examples I was thinking of when I replied to you in the other thread. find_longest_prefixes() is the entry-point, and does a little bit of setup and tear down that is unique. But the recursion happens within find_longest_prefixes_1(), which does not want to repeat the same setup and tear down, hence the split. I still maintain that _1() is a useful convention for differentiating between the two, but I'm fine to be in the minority there ;-). Thanks, Taylor