Re: [PATCH v3 5/7] refs: add pseudorefs array and iteration functions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 24, 2023, 00:08 UTC
- Message-ID
- <xmqqjzrc7ugc.fsf@gitster.g>
- In-Reply-To
- <20231023221143.72489-6-andy.koppe@gmail.com>
Andy Koppe <andy.koppe@gmail.com> writes:
> Define const array 'pseudorefs' with the names of the pseudorefs that > are documented in gitrevisions.1, and add functions for_each_pseudoref() > and refs_for_each_pseudoref() for iterating over them.
Makes sense, and we can later (ab|re)use the same mechanism to extend "git for-each-ref" that currently only knows how to show things under "refs/" hierarchy.
> The functions process the pseudorefs in the same way as head_ref() and > refs_head_ref() process HEAD, invoking an each_ref_fn callback on each > pseudoref that exists.
Good.