Re: [PATCH] ref-filter: format iteratively with lexicographic refname sorting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux