Re: [PATCH 2/4] refs: simplify logic when migrating reflog entries
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Jul 28, 2025, 16:08 UTC
- Message-ID
- <b4mvddzjkdv3htup4htigdifp3zydrknhheza4vn3dqkecgx55@vyhj57qanllk>
- In-Reply-To
- <20250728-pks-remote-rename-improvements-v1-2-f654f2b5c5ae@pks.im>
On 25/07/28 03:08PM, Patrick Steinhardt wrote:
Show 23 quoted lines
> diff --git a/refs.c b/refs.c
> index fd9a5f36b20..b820c3908bd 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -2942,6 +2942,7 @@ struct migration_data {
> struct ref_transaction *transaction;
> struct strbuf *errbuf;
> struct strbuf sb, name, mail;
> + uint64_t index;
> };
>
> static int migrate_one_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
> @@ -2974,14 +2975,6 @@ static int migrate_one_ref(const char *refname, const char *referent UNUSED, con
> return ret;
> }
>
> -struct reflog_migration_data {
> - uint64_t index;
> - struct ref_store *old_refs;
> - struct ref_transaction *transaction;
> - struct strbuf *errbuf;
> - struct strbuf *sb, *name, *mail;
> -};When I recently was looking at this in [1], I remember finding this rather awkward/confusing. Very happy to see it go now in favor of something much simpler :)
-Justin
[1]: <tg72v5vgu56b6akawy7sfapi2qtrmy7q3uruhersy4dtzkpvju@wamlylndp3xv>