refs: allow to skip creation of reflog entries
The ref backends do not have any way to disable the creation of reflog entries. This will be required for upcoming ref format migration logic so that we do not create any entries that didn't exist in the original ref database. Provide a new `REF_SKIP_CREATE_REFLOG` flag that allows the caller to disable reflog entry creation. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
6e1683ace9
commit
fbd1a693c7
@ -1103,7 +1103,8 @@ static int write_transaction_table(struct reftable_writer *writer, void *cb_data
|
||||
|
||||
if (ret)
|
||||
goto done;
|
||||
} else if (u->flags & REF_HAVE_NEW &&
|
||||
} else if (!(u->flags & REF_SKIP_CREATE_REFLOG) &&
|
||||
(u->flags & REF_HAVE_NEW) &&
|
||||
(u->flags & REF_FORCE_CREATE_REFLOG ||
|
||||
should_write_log(&arg->refs->base, u->refname))) {
|
||||
struct reftable_log_record *log;
|
||||
|
||||
Reference in New Issue
Block a user