]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/reflog: respect user config in "write" subcommand
authorMichael Lohmann <git@lohmann.sh>
Tue, 30 Sep 2025 19:53:20 +0000 (21:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Oct 2025 16:49:05 +0000 (09:49 -0700)
commit4a72736d1993d5702d074ea1a92e584633b20f54
tree89561dc1f55e0bf03c0f9e3366155bfd2d37168d
parent465eff81de44763832e96fbe609ec269f1c23ade
builtin/reflog: respect user config in "write" subcommand

The reflog write recognizes only GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL environment variables, but forgot to honor the
user.name and user.email configuration variables, due to lack of
repo_config() call to grab these values from the configuration files.

The test suite sets these variables, so this behavior was unnoticed.

Ensure that the reflog write also uses the values of user.name and
user.email if set in the Git configuration.

Co-authored-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Michael Lohmann <git@lohmann.sh>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reflog.c
t/t1421-reflog-write.sh