aboutsummaryrefslogtreecommitdiffstats
path: root/refs
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-08-28 15:25:33 +0000
committerJunio C Hamano <gitster@pobox.com>2020-09-08 15:51:07 -0700
commit63c056736544c8273dc6dc4275c2f2857bbaee44 (patch)
tree64eb6bc50118ed905a0ffb05688cd746b4a09f4f /refs
parent3a238e539bcdfe3f9eb5010fd218640c1b499f7a (diff)
downloadgit-63c056736544c8273dc6dc4275c2f2857bbaee44.tar.gz
refs: move REF_LOG_ONLY to refs-internal.h
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>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c7
-rw-r--r--refs/refs-internal.h7
2 files changed, 7 insertions, 7 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index dd712e47f4..04e85e7002 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -39,13 +39,6 @@
#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.
*/
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 527b0a6e2e..87a1201bf9 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -32,6 +32,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:
*/