Skip to content

Commit 63c0567

Browse files
hanwengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3a238e5 commit 63c0567

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

refs/files-backend.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838
*/
3939
#define REF_NEEDS_COMMIT (1 << 6)
4040

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-
4841
/*
4942
* Used as a flag in ref_update::flags when the ref_update was via an
5043
* update to HEAD.

refs/refs-internal.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ struct ref_transaction;
3131
*/
3232
#define REF_HAVE_OLD (1 << 3)
3333

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+
3441
/*
3542
* Return the length of time to retry acquiring a loose reference lock
3643
* before giving up, in milliseconds:

0 commit comments

Comments
 (0)