Merge branch 'kn/reflog-migration-fix-followup'
Code clean-up. * kn/reflog-migration-fix-followup: reftable: prevent 'update_index' changes after adding records refs: use 'uint64_t' for 'ref_update.index' refs: mark `ref_transaction_update_reflog()` as static
This commit is contained in:
24
refs.c
24
refs.c
@ -1318,13 +1318,21 @@ int ref_transaction_update(struct ref_transaction *transaction,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ref_transaction_update_reflog(struct ref_transaction *transaction,
|
||||
const char *refname,
|
||||
const struct object_id *new_oid,
|
||||
const struct object_id *old_oid,
|
||||
const char *committer_info, unsigned int flags,
|
||||
const char *msg, unsigned int index,
|
||||
struct strbuf *err)
|
||||
/*
|
||||
* Similar to`ref_transaction_update`, but this function is only for adding
|
||||
* a reflog update. Supports providing custom committer information. The index
|
||||
* field can be utiltized to order updates as desired. When not used, the
|
||||
* updates default to being ordered by refname.
|
||||
*/
|
||||
static int ref_transaction_update_reflog(struct ref_transaction *transaction,
|
||||
const char *refname,
|
||||
const struct object_id *new_oid,
|
||||
const struct object_id *old_oid,
|
||||
const char *committer_info,
|
||||
unsigned int flags,
|
||||
const char *msg,
|
||||
uint64_t index,
|
||||
struct strbuf *err)
|
||||
{
|
||||
struct ref_update *update;
|
||||
|
||||
@ -2805,7 +2813,7 @@ done:
|
||||
}
|
||||
|
||||
struct reflog_migration_data {
|
||||
unsigned int index;
|
||||
uint64_t index;
|
||||
const char *refname;
|
||||
struct ref_store *old_refs;
|
||||
struct ref_transaction *transaction;
|
||||
|
Reference in New Issue
Block a user