]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
am, sequencer: stop parsing our own committer ident
authorJeff King <peff@peff.net>
Fri, 23 Oct 2020 07:26:30 +0000 (03:26 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Oct 2020 16:59:57 +0000 (09:59 -0700)
commit2020451c5bcc5289b8e6f25c7092d4fdb702257a
tree6bf7b3c23638f7b8581d79fd26a551b41899ab01
parent5f35edd9d7ebca17f205b338d340cc6ce214644a
am, sequencer: stop parsing our own committer ident

For the --committer-date-is-author-date option of git-am and git-rebase,
we format the committer ident, then re-parse it to find the name and
email, and then feed those back to fmt_ident().

We can simplify this by handling it all at the time of the fmt_ident()
call. We pass in the appropriate getenv() results, and if they're not
present, then our WANT_COMMITTER_IDENT flag tells fmt_ident() to fill in
the appropriate value from the config. Which is exactly what
git_committer_ident() was doing under the hood.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/am.c
sequencer.c
sequencer.h