]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs: move REF_LOG_ONLY to refs-internal.h
authorHan-Wen Nienhuys <hanwen@google.com>
Fri, 28 Aug 2020 15:25:33 +0000 (15:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Sep 2020 22:51:07 +0000 (15:51 -0700)
REF_LOG_ONLY is used in the transaction preparation: if a symref is involved in
a transaction, the referent of the symref should be updated, and the symref
itself should only be updated in the reflog.

Other ref backends will need to duplicate this logic too, so move it to a
central place.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c
refs/refs-internal.h

index dd712e47f4190e6a0f7a1a5ecc446790827e9563..04e85e70029bf04e03ec25e008ae334cd35de39a 100644 (file)
  */
 #define REF_NEEDS_COMMIT (1 << 6)
 
-/*
- * Used as a flag in ref_update::flags when we want to log a ref
- * update but not actually perform it.  This is used when a symbolic
- * ref update is split up.
- */
-#define REF_LOG_ONLY (1 << 7)
-
 /*
  * Used as a flag in ref_update::flags when the ref_update was via an
  * update to HEAD.
index 527b0a6e2e636b129cfcff2a88c1c112c41a8c57..87a1201bf936bbee18678447490f26883380e04d 100644 (file)
@@ -31,6 +31,13 @@ struct ref_transaction;
  */
 #define REF_HAVE_OLD (1 << 3)
 
+/*
+ * Used as a flag in ref_update::flags when we want to log a ref
+ * update but not actually perform it.  This is used when a symbolic
+ * ref update is split up.
+ */
+#define REF_LOG_ONLY (1 << 7)
+
 /*
  * Return the length of time to retry acquiring a loose reference lock
  * before giving up, in milliseconds: