@matheusbsbs / matheus-bagliano / commits / 63c0567365
Fork 0

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>

Han-Wen Nienhuys committed Aug 28, 2020 at 15:25 UTC 63c056736544c8273dc6dc4275c2f2857bbaee44
2 files changed +7 -7
refs/files-backend.c
-7
@@ -38,13 +38,6 @@
38 */
39 #define REF_NEEDS_COMMIT (1 << 6)
40
41 -/*
42 - * Used as a flag in ref_update::flags when we want to log a ref
43 - * update but not actually perform it. This is used when a symbolic
44 - * ref update is split up.
45 - */
46 -#define REF_LOG_ONLY (1 << 7)
47 -
41 /*
42 * Used as a flag in ref_update::flags when the ref_update was via an
43 * update to HEAD.
refs/refs-internal.h
+7
@@ -31,6 +31,13 @@ struct ref_transaction;
31 */
32 #define REF_HAVE_OLD (1 << 3)
33
34 +/*
35 + * Used as a flag in ref_update::flags when we want to log a ref
36 + * update but not actually perform it. This is used when a symbolic
37 + * ref update is split up.
38 + */
39 +#define REF_LOG_ONLY (1 << 7)
40 +
41 /*
42 * Return the length of time to retry acquiring a loose reference lock
43 * before giving up, in milliseconds: