1313/*
1414 * This backend uses the following flags in `ref_update::flags` for
1515 * internal bookkeeping purposes. Their numerical values must not
16- * conflict with REF_NODEREF , REF_FORCE_CREATE_REFLOG, REF_HAVE_NEW,
16+ * conflict with REF_NO_DEREF , REF_FORCE_CREATE_REFLOG, REF_HAVE_NEW,
1717 * REF_HAVE_OLD, or REF_ISPRUNING, 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
23- * pruned. This flag must only be used when REF_NODEREF is set.
23+ * pruned. This flag must only be used when REF_NO_DEREF is set.
2424 */
2525#define REF_ISPRUNING (1 << 4)
2626
@@ -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_NODEREF | REF_HAVE_NEW | REF_HAVE_OLD | REF_ISPRUNING ,
1047+ REF_NO_DEREF | REF_HAVE_NEW | REF_HAVE_OLD | REF_ISPRUNING ,
10481048 & null_oid , & r -> oid , NULL );
10491049 if (ref_transaction_commit (transaction , & err ))
10501050 goto cleanup ;
@@ -1133,7 +1133,7 @@ static int files_pack_refs(struct ref_store *ref_store, unsigned int flags)
11331133 */
11341134 if (ref_transaction_update (transaction , iter -> refname ,
11351135 iter -> oid , NULL ,
1136- REF_NODEREF , NULL , & err ))
1136+ REF_NO_DEREF , NULL , & err ))
11371137 die ("failure preparing to create packed reference %s: %s" ,
11381138 iter -> refname , err .buf );
11391139
@@ -1336,7 +1336,7 @@ static int files_copy_or_rename_ref(struct ref_store *ref_store,
13361336 }
13371337
13381338 if (!copy && refs_delete_ref (& refs -> base , logmsg , oldrefname ,
1339- & orig_oid , REF_NODEREF )) {
1339+ & orig_oid , REF_NO_DEREF )) {
13401340 error ("unable to delete old %s" , oldrefname );
13411341 goto rollback ;
13421342 }
@@ -1352,7 +1352,7 @@ static int files_copy_or_rename_ref(struct ref_store *ref_store,
13521352 RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE ,
13531353 & oid , NULL ) &&
13541354 refs_delete_ref (& refs -> base , NULL , newrefname ,
1355- NULL , REF_NODEREF )) {
1355+ NULL , REF_NO_DEREF )) {
13561356 if (errno == EISDIR ) {
13571357 struct strbuf path = STRBUF_INIT ;
13581358 int result ;
@@ -1377,7 +1377,7 @@ static int files_copy_or_rename_ref(struct ref_store *ref_store,
13771377 logmoved = log ;
13781378
13791379 lock = lock_ref_oid_basic (refs , newrefname , NULL , NULL , NULL ,
1380- REF_NODEREF , NULL , & err );
1380+ REF_NO_DEREF , NULL , & err );
13811381 if (!lock ) {
13821382 if (copy )
13831383 error ("unable to copy '%s' to '%s': %s" , oldrefname , newrefname , err .buf );
@@ -1400,7 +1400,7 @@ static int files_copy_or_rename_ref(struct ref_store *ref_store,
14001400
14011401 rollback :
14021402 lock = lock_ref_oid_basic (refs , oldrefname , NULL , NULL , NULL ,
1403- REF_NODEREF , NULL , & err );
1403+ REF_NO_DEREF , NULL , & err );
14041404 if (!lock ) {
14051405 error ("unable to lock %s for rollback: %s" , oldrefname , err .buf );
14061406 strbuf_release (& err );
@@ -1816,7 +1816,7 @@ static int files_create_symref(struct ref_store *ref_store,
18161816 int ret ;
18171817
18181818 lock = lock_ref_oid_basic (refs , refname , NULL ,
1819- NULL , NULL , REF_NODEREF , NULL ,
1819+ NULL , NULL , REF_NO_DEREF , NULL ,
18201820 & err );
18211821 if (!lock ) {
18221822 error ("%s" , err .buf );
@@ -2200,7 +2200,7 @@ static int split_head_update(struct ref_update *update,
22002200
22012201 new_update = ref_transaction_add_update (
22022202 transaction , "HEAD" ,
2203- update -> flags | REF_LOG_ONLY | REF_NODEREF ,
2203+ update -> flags | REF_LOG_ONLY | REF_NO_DEREF ,
22042204 & update -> new_oid , & update -> old_oid ,
22052205 update -> msg );
22062206
@@ -2219,8 +2219,8 @@ static int split_head_update(struct ref_update *update,
22192219
22202220/*
22212221 * update is for a symref that points at referent and doesn't have
2222- * REF_NODEREF set. Split it into two updates:
2223- * - The original update, but with REF_LOG_ONLY and REF_NODEREF set
2222+ * REF_NO_DEREF set. Split it into two updates:
2223+ * - The original update, but with REF_LOG_ONLY and REF_NO_DEREF set
22242224 * - A new, separate update for the referent reference
22252225 * Note that the new update will itself be subject to splitting when
22262226 * the iteration gets to it.
@@ -2275,7 +2275,7 @@ static int split_symref_update(struct files_ref_store *refs,
22752275 * doesn't need to check its old SHA-1 value, as that will be
22762276 * done when new_update is processed.
22772277 */
2278- update -> flags |= REF_LOG_ONLY | REF_NODEREF ;
2278+ update -> flags |= REF_LOG_ONLY | REF_NO_DEREF ;
22792279 update -> flags &= ~REF_HAVE_OLD ;
22802280
22812281 /*
@@ -2344,7 +2344,7 @@ static int check_old_oid(struct ref_update *update, struct object_id *oid,
23442344 * - Check that its old SHA-1 value (if specified) is correct, and in
23452345 * any case record it in update->lock->old_oid for later use when
23462346 * writing the reflog.
2347- * - If it is a symref update without REF_NODEREF , split it up into a
2347+ * - If it is a symref update without REF_NO_DEREF , split it up into a
23482348 * REF_LOG_ONLY update of the symref and add a separate update for
23492349 * the referent to transaction.
23502350 * - If it is an update of head_ref, add a corresponding REF_LOG_ONLY
@@ -2392,7 +2392,7 @@ static int lock_ref_for_update(struct files_ref_store *refs,
23922392 update -> backend_data = lock ;
23932393
23942394 if (update -> type & REF_ISSYMREF ) {
2395- if (update -> flags & REF_NODEREF ) {
2395+ if (update -> flags & REF_NO_DEREF ) {
23962396 /*
23972397 * We won't be reading the referent as part of
23982398 * the transaction, so we have to read it here
@@ -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_NODEREF .
2567+ * updates use REF_ISPRUNING 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
25742574 if ((update -> flags & REF_ISPRUNING ) &&
2575- !(update -> flags & REF_NODEREF ))
2576- BUG ("REF_ISPRUNING set without REF_NODEREF " );
2575+ !(update -> flags & REF_NO_DEREF ))
2576+ BUG ("REF_ISPRUNING set without REF_NO_DEREF " );
25772577
25782578 /*
25792579 * We store a pointer to update in item->util, but at
@@ -2651,7 +2651,7 @@ static int files_transaction_prepare(struct ref_store *ref_store,
26512651
26522652 ref_transaction_add_update (
26532653 packed_transaction , update -> refname ,
2654- REF_HAVE_NEW | REF_NODEREF ,
2654+ REF_HAVE_NEW | REF_NO_DEREF ,
26552655 & update -> new_oid , NULL ,
26562656 NULL );
26572657 }
@@ -2995,7 +2995,7 @@ static int files_reflog_expire(struct ref_store *ref_store,
29952995 * reference if --updateref was specified:
29962996 */
29972997 lock = lock_ref_oid_basic (refs , refname , oid ,
2998- NULL , NULL , REF_NODEREF ,
2998+ NULL , NULL , REF_NO_DEREF ,
29992999 & type , & err );
30003000 if (!lock ) {
30013001 error ("cannot lock ref '%s': %s" , refname , err .buf );
0 commit comments