diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-02-23 12:59:40 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-23 13:21:18 -0800 |
| commit | aefcc9b367016581743e57adf667ee4d56691bb1 (patch) | |
| tree | 94bf657d9bf6be65188ecde55f39e4f3aad18404 /contrib/persistent-https | |
| parent | 635f08b7394b9dda013a0b78f4db11348dc7717b (diff) | |
| download | git-aefcc9b367016581743e57adf667ee4d56691bb1.tar.gz git-aefcc9b367016581743e57adf667ee4d56691bb1.zip | |
refs: introduce `refs_for_each_ref_ext`
In the refs subsystem we have a proliferation of functions that all
iterate through references. (Almost) all of these functions internally
call `do_for_each_ref()` and provide slightly different arguments so
that one can control different aspects of its behaviour. This approach
doesn't really scale: every time there is a slightly different use case
for iterating through refs we create another new function.
This combinatorial explosion doesn't make a lot of sense: it leads to
confusing interfaces and heightens the maintenance burden.
Refactor the code to become more composable by:
- Exposing `do_for_each_ref()` as `refs_for_each_ref_ext()`.
- Introducing an options structure that lets the caller control
individual options.
This gives us a much better foundation to build on going forward.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
