Re: [PATCH v4 5/8] refs: add `committer_info` to `ref_transaction_add_update()`
- From
karthik nayak <karthik.188@gmail.com>
- Date
- Dec 20, 2024, 10:44 UTC
- Message-ID
- <CAOLa=ZRUQVwkyv+JgCPoqAkUar+0Yt4oYJ-c=tfgCL+W8v6vMw@mail.gmail.com>
- In-Reply-To
- <878qsbh3nh.fsf@iotcl.com>
Toon Claes <toon@iotcl.com> writes:
> Karthik Nayak <karthik.188@gmail.com> writes:
[snip]
Show 15 quoted lines
>> {
>> struct ref_update *update;
>> @@ -1190,8 +1191,10 @@ struct ref_update *ref_transaction_add_update(
>> oidcpy(&update->new_oid, new_oid);
>> if ((flags & REF_HAVE_OLD) && old_oid)
>> oidcpy(&update->old_oid, old_oid);
>> - if (!(flags & REF_SKIP_CREATE_REFLOG))
>> + if (!(flags & REF_SKIP_CREATE_REFLOG)) {
>> + update->committer_info = xstrdup_or_null(committer_info);
>
> Why only include the committer_info when we're not skipping reflog
> updates?
>
> --
> ToonThe `committer_info` contains information around 1. author of a ref update 2. date/time of the update
This is only relevant in the context of reflogs. Regular ref updates don't store this information. Hence we only add it for reflogs here.