summaryrefslogtreecommitdiff
path: root/builtin/am.c
diff options
context:
space:
mode:
authorLibravatar William Hubbs <williamh@gentoo.org>2019-02-04 12:48:50 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-02-04 12:18:13 -0800
commit39ab4d0951ba64edcfae7809740715991b44fa6d (patch)
tree262e584b777c84928d7bb6ed6bf7360693eb8612 /builtin/am.c
parentThird batch after 2.20 (diff)
downloadtgif-39ab4d0951ba64edcfae7809740715991b44fa6d.tar.xz
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 <williamh@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 95370313b6..3727d4d267 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1594,6 +1594,7 @@ static void do_commit(const struct am_state *state)
}
author = fmt_ident(state->author_name, state->author_email,
+ WANT_AUTHOR_IDENT,
state->ignore_date ? NULL : state->author_date,
IDENT_STRICT);