aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-02-23 12:59:38 +0100
committerJunio C Hamano <gitster@pobox.com>2026-02-23 13:21:18 -0800
commit8f0720a5a781562fb1f750b351e14129fc8930ea (patch)
treeb04b6079ab2f73b86e2225d4b9d1ac279bf120e6 /refs.h
parent1c3aff34b88f132ba3d489dbd9ff30f2604bb871 (diff)
downloadgit-8f0720a5a781562fb1f750b351e14129fc8930ea.tar.xz
refs: rename `do_for_each_ref_flags`
The enum `do_for_each_ref_flags` and its individual values don't match to our current best practices when it comes to naming things. Rename it to `refs_for_each_flag`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/refs.h b/refs.h
index 6fd7a706b5..2ae4a6e75b 100644
--- a/refs.h
+++ b/refs.h
@@ -406,7 +406,7 @@ typedef int each_ref_fn(const struct reference *ref, void *cb_data);
* These flags are passed to refs_ref_iterator_begin() (and do_for_each_ref(),
* which feeds it).
*/
-enum do_for_each_ref_flags {
+enum refs_for_each_flag {
/*
* Include broken references in a do_for_each_ref*() iteration, which
* would normally be omitted. This includes both refs that point to
@@ -416,7 +416,7 @@ enum do_for_each_ref_flags {
* ref; this is not a corruption, but as they have no valid oid, we
* omit them from normal iteration results).
*/
- DO_FOR_EACH_INCLUDE_BROKEN = (1 << 0),
+ REFS_FOR_EACH_INCLUDE_BROKEN = (1 << 0),
/*
* Only include per-worktree refs in a do_for_each_ref*() iteration.
@@ -424,19 +424,19 @@ enum do_for_each_ref_flags {
* where all reference backends will presumably store their
* per-worktree refs.
*/
- DO_FOR_EACH_PER_WORKTREE_ONLY = (1 << 1),
+ REFS_FOR_EACH_PER_WORKTREE_ONLY = (1 << 1),
/*
* Omit dangling symrefs from output; this only has an effect with
* INCLUDE_BROKEN, since they are otherwise not included at all.
*/
- DO_FOR_EACH_OMIT_DANGLING_SYMREFS = (1 << 2),
+ REFS_FOR_EACH_OMIT_DANGLING_SYMREFS = (1 << 2),
/*
* Include root refs i.e. HEAD and pseudorefs along with the regular
* refs.
*/
- DO_FOR_EACH_INCLUDE_ROOT_REFS = (1 << 3),
+ REFS_FOR_EACH_INCLUDE_ROOT_REFS = (1 << 3),
};
/*
@@ -1372,7 +1372,7 @@ struct ref_iterator;
struct ref_iterator *refs_ref_iterator_begin(
struct ref_store *refs,
const char *prefix, const char **exclude_patterns,
- int trim, enum do_for_each_ref_flags flags);
+ int trim, enum refs_for_each_flag flags);
/*
* Advance the iterator to the first or next item and return ITER_OK.