Re: [PATCH 7/7] refs: add support for migrating reflogs
From: Patrick Steinhardt <hidden>
Date: 2024-12-11 14:26:47
On Mon, Dec 09, 2024 at 12:07:21PM +0100, Karthik Nayak wrote:
quoted hunk ↗ jump to hunk
@@ -2687,6 +2688,7 @@ int ref_update_check_old_target(const char *referent, struct ref_update *update, } struct migration_data { + unsigned int index; struct ref_store *old_refs; struct ref_transaction *transaction; struct strbuf *errbuf;
Calling this `reflog_index` might be a bit easier for context.
quoted hunk ↗ jump to hunk
@@ -2868,8 +2894,8 @@ int repo_migrate_ref_storage_format(struct repository *repo, * 1. Set up a new temporary directory and initialize it with the new * format. This is where all refs will be migrated into. * - * 2. Enumerate all refs and write them into the new ref storage. - * This operation is safe as we do not yet modify the main + * 2. Enumerate all refs and reflogs and write them into the new ref + * storage. This operation is safe as we do not yet modify the main
I'd rather move this into a third step, as it is separate from the ref enumeration. Patrick