refs: introduce REF_SKIP_REFNAME_VERIFICATION flag
Use this flag with the test-helper in t1430, to avoid direct writes to the ref database. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e9706a188f
commit
3c966c7b4e
10
refs.h
10
refs.h
@ -621,12 +621,18 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);
|
||||
*/
|
||||
#define REF_SKIP_OID_VERIFICATION (1 << 10)
|
||||
|
||||
/*
|
||||
* Skip verifying refname. This is useful for testing data corruption scenarios.
|
||||
*/
|
||||
#define REF_SKIP_REFNAME_VERIFICATION (1 << 11)
|
||||
|
||||
/*
|
||||
* Bitmask of all of the flags that are allowed to be passed in to
|
||||
* ref_transaction_update() and friends:
|
||||
*/
|
||||
#define REF_TRANSACTION_UPDATE_ALLOWED_FLAGS \
|
||||
(REF_NO_DEREF | REF_FORCE_CREATE_REFLOG | REF_SKIP_OID_VERIFICATION)
|
||||
#define REF_TRANSACTION_UPDATE_ALLOWED_FLAGS \
|
||||
(REF_NO_DEREF | REF_FORCE_CREATE_REFLOG | REF_SKIP_OID_VERIFICATION | \
|
||||
REF_SKIP_REFNAME_VERIFICATION)
|
||||
|
||||
/*
|
||||
* Add a reference update to transaction. `new_oid` is the value that
|
||||
|
Reference in New Issue
Block a user