diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-02-14 17:53:48 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-14 17:53:48 -0800 |
| commit | 82522a9e2ce3e2b400a217a21b05204a2034edbc (patch) | |
| tree | f893beca295e99602b5cdd57a38263827ca3e0f3 /refs.c | |
| parent | Merge branch 'bf/fetch-set-head-fix' (diff) | |
| parent | reftable: prevent 'update_index' changes after adding records (diff) | |
| download | git-82522a9e2ce3e2b400a217a21b05204a2034edbc.tar.gz git-82522a9e2ce3e2b400a217a21b05204a2034edbc.zip | |
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
Diffstat (limited to 'refs.c')
| -rw-r--r-- | refs.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -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; |
