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>
Michael Haggerty committed
Nov 5, 2017 at 09:42 UTC
acedcde76db257e4822291a180d5985852f8e621
1 file changed
+9
-9
refs/files-backend.c
+9
-9
@@ -14,7 +14,7 @@
14
* This backend uses the following flags in `ref_update::flags` for
15
* internal bookkeeping purposes. Their numerical values must not
16
* 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
18
* `ref_update::flags`.
19
*/
20
@@ -22,7 +22,7 @@
22
* Used as a flag in ref_update::flags when a loose ref is being
23
* pruned. This flag must only be used when REF_NO_DEREF is set.
24
*/
25
-#define REF_ISPRUNING (1 << 4)
25
+#define REF_IS_PRUNING (1 << 4)
26
27
/*
28
* 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)
1044
goto cleanup;
1045
ref_transaction_add_update(
1046
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,
1048
&null_oid, &r->oid, NULL);
1049
if (ref_transaction_commit(transaction, &err))
1050
goto cleanup;
@@ -2177,7 +2177,7 @@ static int split_head_update(struct ref_update *update,
2177
struct ref_update *new_update;
2178
2179
if ((update->flags & REF_LOG_ONLY) ||
2180
- (update->flags & REF_ISPRUNING) ||
2180
+ (update->flags & REF_IS_PRUNING) ||
2181
(update->flags & REF_UPDATE_VIA_HEAD))
2182
return 0;
2183
@@ -2564,16 +2564,16 @@ static int files_transaction_prepare(struct ref_store *ref_store,
2564
* split_symref_update() or split_head_update(), those
2565
* functions will check that the new updates don't have the
2566
* 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.
2568
*/
2569
for (i = 0; i < transaction->nr; i++) {
2570
struct ref_update *update = transaction->updates[i];
2571
struct string_list_item *item =
2572
string_list_append(&affected_refnames, update->refname);
2573
2574
- if ((update->flags & REF_ISPRUNING) &&
2574
+ if ((update->flags & REF_IS_PRUNING) &&
2575
!(update->flags & REF_NO_DEREF))
2576
- BUG("REF_ISPRUNING set without REF_NO_DEREF");
2576
+ BUG("REF_IS_PRUNING set without REF_NO_DEREF");
2577
2578
/*
2579
* 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,
2632
2633
if (update->flags & REF_DELETING &&
2634
!(update->flags & REF_LOG_ONLY) &&
2635
- !(update->flags & REF_ISPRUNING)) {
2635
+ !(update->flags & REF_IS_PRUNING)) {
2636
/*
2637
* This reference has to be deleted from
2638
* packed-refs if it exists there.
@@ -2749,7 +2749,7 @@ static int files_transaction_finish(struct ref_store *ref_store,
2749
struct ref_update *update = transaction->updates[i];
2750
if (update->flags & REF_DELETING &&
2751
!(update->flags & REF_LOG_ONLY) &&
2752
- !(update->flags & REF_ISPRUNING)) {
2752
+ !(update->flags & REF_IS_PRUNING)) {
2753
strbuf_reset(&sb);
2754
files_reflog_path(refs, &sb, update->refname);
2755
if (!unlink_or_warn(sb.buf))