Re: [PATCH 7/7] refs: add support for migrating reflogs
- From
karthik nayak <karthik.188@gmail.com>
- Date
- Dec 12, 2024, 14:04 UTC
- Message-ID
- <CAOLa=ZROACAy2_jDSUxZ9rAZ0o7eKugtuqZLh_aWkHH6NRjdcQ@mail.gmail.com>
- In-Reply-To
- <Z1mhFqmznVxObmAn@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 12 quoted lines
> On Mon, Dec 09, 2024 at 12:07:21PM +0100, Karthik Nayak wrote:
>> @@ -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.
>Makes sense, will amend.
Show 14 quoted lines
>> @@ -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 >
I added it together since it is a single transaction, but I'm okay with making this change, will amend in. Thanks