Re: [PATCH v4 5/8] refs: add `committer_info` to `ref_transaction_add_update()`
From: karthik nayak <hidden>
Date: 2024-12-20 10:44:16
Attachments
- signature.asc [application/pgp-signature] 690 bytes
From: karthik nayak <hidden>
Date: 2024-12-20 10:44:16
Toon Claes [off-list ref] writes:
Karthik Nayak [off-list ref] writes:
[snip]
quoted
{ 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.