diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-10-26 14:59:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-26 14:59:58 -0700 |
commit | f34687dc8109dccfebb4957897e611e7ed9e31ff (patch) | |
tree | e6853ba263bb3c5e30443b531a90aa5b6549d298 | |
parent | Sync with Git 2.29.1 (diff) | |
parent | rebase: fix broken email with --committer-date-is-author-date (diff) | |
download | tgif-f34687dc8109dccfebb4957897e611e7ed9e31ff.tar.xz |
Merge branch 'jk/committer-date-is-author-date-fix'
In 2.29, "--committer-date-is-author-date" option of "rebase" and
"am" subcommands lost the e-mail address by mistake, which has been
corrected.
* jk/committer-date-is-author-date-fix:
rebase: fix broken email with --committer-date-is-author-date
am: fix broken email with --committer-date-is-author-date
t3436: check --committer-date-is-author-date result more carefully
-rw-r--r-- | builtin/am.c | 4 | ||||
-rw-r--r-- | sequencer.c | 2 | ||||
-rwxr-xr-x | t/t3436-rebase-more-options.sh | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/builtin/am.c b/builtin/am.c index 2c7673f74e..4949535a7f 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -161,7 +161,7 @@ static void am_state_init(struct am_state *state) state->committer_name = xmemdupz(id.name_begin, id.name_end - id.name_begin); state->committer_email = - xmemdupz(id.mail_begin, id.mail_end - id.mail_end); + xmemdupz(id.mail_begin, id.mail_end - id.mail_begin); } /** @@ -1595,7 +1595,7 @@ static void do_commit(const struct am_state *state) if (state->committer_date_is_author_date) committer = fmt_ident(state->committer_name, - state->author_email, WANT_COMMITTER_IDENT, + state->committer_email, WANT_COMMITTER_IDENT, state->ignore_date ? NULL : state->author_date, IDENT_STRICT); diff --git a/sequencer.c b/sequencer.c index 00acb12496..d76cbded00 100644 --- a/sequencer.c +++ b/sequencer.c @@ -4478,7 +4478,7 @@ static int init_committer(struct replay_opts *opts) opts->committer_name = xmemdupz(id.name_begin, id.name_end - id.name_begin); opts->committer_email = - xmemdupz(id.mail_begin, id.mail_end - id.mail_end); + xmemdupz(id.mail_begin, id.mail_end - id.mail_begin); return 0; } diff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh index 996e82787e..eaaf4c8d1d 100755 --- a/t/t3436-rebase-more-options.sh +++ b/t/t3436-rebase-more-options.sh @@ -65,8 +65,8 @@ test_expect_success '--ignore-whitespace is remembered when continuing' ' ' test_ctime_is_atime () { - git log $1 --format=%ai >authortime && - git log $1 --format=%ci >committertime && + git log $1 --format="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> %ai" >authortime && + git log $1 --format="%cn <%ce> %ci" >committertime && test_cmp authortime committertime } |