mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'kn/reflog-migration-fix' into kn/reflog-migration-fix-followup
* kn/reflog-migration-fix: reftable: write correct max_update_index to header
This commit is contained in:
7
refs.c
7
refs.c
@@ -1345,6 +1345,13 @@ int ref_transaction_update_reflog(struct ref_transaction *transaction,
|
||||
update->flags &= ~REF_HAVE_OLD;
|
||||
update->index = index;
|
||||
|
||||
/*
|
||||
* Reference backends may need to know the max index to optimize
|
||||
* their writes. So we store the max_index on the transaction level.
|
||||
*/
|
||||
if (index > transaction->max_index)
|
||||
transaction->max_index = index;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user