Patrick Steinhardt [off-list ref] writes:
Move the index into `struct migration_data` and drop the now-unused
`struct reflog_migration_data` to simplify the code a bit.
Nice.
quoted hunk
@@ -3015,17 +3008,8 @@ static int migrate_one_reflog_entry(const char *refname,
static int migrate_one_reflog(const char *refname, void *cb_data)
{
struct migration_data *migration_data = cb_data;
- struct reflog_migration_data data = {
- .old_refs = migration_data->old_refs,
- .transaction = migration_data->transaction,
- .errbuf = migration_data->errbuf,
- .sb = &migration_data->sb,
- .name = &migration_data->name,
- .mail = &migration_data->mail,
- };
We no longer make this copy, which makes sense.
return refs_for_each_reflog_ent(migration_data->old_refs, refname,
- migrate_one_reflog_entry, &data);
+ migrate_one_reflog_entry, migration_data);
}