]> git.ipfire.org Git - thirdparty/git.git/commit
refs: include committer info in `ref_update` struct
authorKarthik Nayak <karthik.188@gmail.com>
Mon, 16 Dec 2024 16:44:26 +0000 (17:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Dec 2024 17:45:32 +0000 (09:45 -0800)
commit1a83e26d72eb2601798dfc07e6f5112964dc9413
tree487b8ddabd49d1a5fa8193f89bb279b61bc619b2
parentdf5d7a7ba558f955c58c79c7f35770a592bd0392
refs: include committer info in `ref_update` struct

The reference backends obtain the committer information from
`git_committer_info(0)` when adding a reflog. The upcoming patches
introduce support for migrating reflogs between the reference backends.
This requires an interface to creating reflogs, including custom
committer information.

Add a new field `committer_info` to the `ref_update` struct, which is
then used by the reference backends. If there is no `committer_info`
provided, the reference backends default to using
`git_committer_info(0)`. The field itself cannot be set to
`git_committer_info(0)` since the values are dynamic and must be
obtained right when the reflog is being committed.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs/files-backend.c
refs/refs-internal.h
refs/reftable-backend.c