Skip to content

Commit bf708ad

Browse files
peffgitster
authored andcommitted
refs-internal.h: move DO_FOR_EACH_* flags next to each other
There are currently two DO_FOR_EACH_* flags, which must not have their bits overlap. Yet they're defined hundreds of lines apart. Let's move them next to each other to make it clear that they are related and are a complete set (which matters if you are adding a new flag and would like to know what the next available bit is). Signed-off-by: Jeff King <[email protected]> Reviewed-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5b062e1 commit bf708ad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

refs/refs-internal.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,14 @@ int refs_rename_ref_available(struct ref_store *refs,
248248
/* Include broken references in a do_for_each_ref*() iteration: */
249249
#define DO_FOR_EACH_INCLUDE_BROKEN 0x01
250250

251+
/*
252+
* Only include per-worktree refs in a do_for_each_ref*() iteration.
253+
* Normally this will be used with a files ref_store, since that's
254+
* where all reference backends will presumably store their
255+
* per-worktree refs.
256+
*/
257+
#define DO_FOR_EACH_PER_WORKTREE_ONLY 0x02
258+
251259
/*
252260
* Reference iterators
253261
*
@@ -498,14 +506,6 @@ int do_for_each_repo_ref_iterator(struct repository *r,
498506
struct ref_iterator *iter,
499507
each_repo_ref_fn fn, void *cb_data);
500508

501-
/*
502-
* Only include per-worktree refs in a do_for_each_ref*() iteration.
503-
* Normally this will be used with a files ref_store, since that's
504-
* where all reference backends will presumably store their
505-
* per-worktree refs.
506-
*/
507-
#define DO_FOR_EACH_PER_WORKTREE_ONLY 0x02
508-
509509
struct ref_store;
510510

511511
/* refs backends */

0 commit comments

Comments
 (0)