]> git.ipfire.org Git - thirdparty/git.git/commit
log: do not set up extra_headers for non-email formats
authorJeff King <peff@peff.net>
Wed, 20 Mar 2024 00:31:39 +0000 (20:31 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Mar 2024 00:54:16 +0000 (17:54 -0700)
commit82363d967042ca2884b087b0895bbc566704388e
tree4d8f5d3cbe10ffd6044b6d1308624d3ad393cf40
parentd5a90d6319aeb6cb3f0b795156c4c2259373424f
log: do not set up extra_headers for non-email formats

The commit pretty-printer code has an "after_subject" parameter which it
uses to insert extra headers into the email format. In show_log() we set
this by calling log_write_email_headers() if we are using an email
format, but otherwise default the variable to the rev_info.extra_headers
variable.

Since the pretty-printer code will ignore after_subject unless we are
using an email format, this default is pointless. We can just set
after_subject directly, eliminating an extra variable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
log-tree.c