From: karthik nayak Date: Fri, 20 Dec 2024 10:44:15 GMT Subject: Re: [PATCH v4 5/8] refs: add `committer_info` to `ref_transaction_add_update()` Message-ID: In-Reply-To: <878qsbh3nh.fsf@iotcl.com> Toon Claes writes: > Karthik Nayak writes: [snip] >> { >> 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? > > -- > Toon The `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.