From 39ab4d0951ba64edcfae7809740715991b44fa6d Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 4 Feb 2019 12:48:50 -0600 Subject: config: allow giving separate author and committer idents The author.email, author.name, committer.email and committer.name settings are analogous to the GIT_AUTHOR_* and GIT_COMMITTER_* environment variables, but for the git config system. This allows them to be set separately for each repository. Git supports setting different authorship and committer information with environment variables. However, environment variables are set in the shell, so if different authorship and committer information is needed for different repositories an external tool is required. This adds support to git config for author.email, author.name, committer.email and committer.name settings so this information can be set per repository. Also, it generalizes the fmt_ident function so it can handle author vs committer identification. Signed-off-by: William Hubbs Signed-off-by: Junio C Hamano --- log-tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'log-tree.c') diff --git a/log-tree.c b/log-tree.c index 10680c139e..43ef4f4300 100644 --- a/log-tree.c +++ b/log-tree.c @@ -687,8 +687,7 @@ void show_log(struct rev_info *opt) */ if (ctx.need_8bit_cte >= 0 && opt->add_signoff) ctx.need_8bit_cte = - has_non_ascii(fmt_name(getenv("GIT_COMMITTER_NAME"), - getenv("GIT_COMMITTER_EMAIL"))); + has_non_ascii(fmt_name(WANT_COMMITTER_IDENT)); ctx.date_mode = opt->date_mode; ctx.date_mode_explicit = opt->date_mode_explicit; ctx.abbrev = opt->diffopt.abbrev; -- cgit v1.2.3