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>
This commit is contained in:
Han-Wen Nienhuys 2020-08-28 15:25:33 +00:00 коммит произвёл Junio C Hamano
Родитель 3a238e539b
Коммит 63c0567365
2 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -38,13 +38,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.

Просмотреть файл

@ -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: