Skip to content

Commit acedcde

Browse files
mhaggergitster
authored andcommitted
refs: rename constant REF_ISPRUNING to REF_IS_PRUNING
Underscores are cheap, and help readability. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 91774af commit acedcde

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

refs/files-backend.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
* This backend uses the following flags in `ref_update::flags` for
1515
* internal bookkeeping purposes. Their numerical values must not
1616
* conflict with REF_NO_DEREF, REF_FORCE_CREATE_REFLOG, REF_HAVE_NEW,
17-
* REF_HAVE_OLD, or REF_ISPRUNING, which are also stored in
17+
* REF_HAVE_OLD, or REF_IS_PRUNING, which are also stored in
1818
* `ref_update::flags`.
1919
*/
2020

2121
/*
2222
* Used as a flag in ref_update::flags when a loose ref is being
2323
* pruned. This flag must only be used when REF_NO_DEREF is set.
2424
*/
25-
#define REF_ISPRUNING (1 << 4)
25+
#define REF_IS_PRUNING (1 << 4)
2626

2727
/*
2828
* Flag passed to lock_ref_sha1_basic() telling it to tolerate broken
@@ -1044,7 +1044,7 @@ static void prune_ref(struct files_ref_store *refs, struct ref_to_prune *r)
10441044
goto cleanup;
10451045
ref_transaction_add_update(
10461046
transaction, r->name,
1047-
REF_NO_DEREF | REF_HAVE_NEW | REF_HAVE_OLD | REF_ISPRUNING,
1047+
REF_NO_DEREF | REF_HAVE_NEW | REF_HAVE_OLD | REF_IS_PRUNING,
10481048
&null_oid, &r->oid, NULL);
10491049
if (ref_transaction_commit(transaction, &err))
10501050
goto cleanup;
@@ -2177,7 +2177,7 @@ static int split_head_update(struct ref_update *update,
21772177
struct ref_update *new_update;
21782178

21792179
if ((update->flags & REF_LOG_ONLY) ||
2180-
(update->flags & REF_ISPRUNING) ||
2180+
(update->flags & REF_IS_PRUNING) ||
21812181
(update->flags & REF_UPDATE_VIA_HEAD))
21822182
return 0;
21832183

@@ -2564,16 +2564,16 @@ static int files_transaction_prepare(struct ref_store *ref_store,
25642564
* split_symref_update() or split_head_update(), those
25652565
* functions will check that the new updates don't have the
25662566
* same refname as any existing ones.) Also fail if any of the
2567-
* updates use REF_ISPRUNING without REF_NO_DEREF.
2567+
* updates use REF_IS_PRUNING without REF_NO_DEREF.
25682568
*/
25692569
for (i = 0; i < transaction->nr; i++) {
25702570
struct ref_update *update = transaction->updates[i];
25712571
struct string_list_item *item =
25722572
string_list_append(&affected_refnames, update->refname);
25732573

2574-
if ((update->flags & REF_ISPRUNING) &&
2574+
if ((update->flags & REF_IS_PRUNING) &&
25752575
!(update->flags & REF_NO_DEREF))
2576-
BUG("REF_ISPRUNING set without REF_NO_DEREF");
2576+
BUG("REF_IS_PRUNING set without REF_NO_DEREF");
25772577

25782578
/*
25792579
* We store a pointer to update in item->util, but at
@@ -2632,7 +2632,7 @@ static int files_transaction_prepare(struct ref_store *ref_store,
26322632

26332633
if (update->flags & REF_DELETING &&
26342634
!(update->flags & REF_LOG_ONLY) &&
2635-
!(update->flags & REF_ISPRUNING)) {
2635+
!(update->flags & REF_IS_PRUNING)) {
26362636
/*
26372637
* This reference has to be deleted from
26382638
* packed-refs if it exists there.
@@ -2749,7 +2749,7 @@ static int files_transaction_finish(struct ref_store *ref_store,
27492749
struct ref_update *update = transaction->updates[i];
27502750
if (update->flags & REF_DELETING &&
27512751
!(update->flags & REF_LOG_ONLY) &&
2752-
!(update->flags & REF_ISPRUNING)) {
2752+
!(update->flags & REF_IS_PRUNING)) {
27532753
strbuf_reset(&sb);
27542754
files_reflog_path(refs, &sb, update->refname);
27552755
if (!unlink_or_warn(sb.buf))

0 commit comments

Comments
 (0)