summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/am.c4
-rwxr-xr-xt/t3436-rebase-more-options.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 896cd0f827..af931e588c 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/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh
index 6f2f49717b..3fda2235bd 100755
--- a/t/t3436-rebase-more-options.sh
+++ b/t/t3436-rebase-more-options.sh
@@ -70,7 +70,7 @@ test_ctime_is_atime () {
test_cmp authortime committertime
}
-test_expect_failure '--committer-date-is-author-date works with apply backend' '
+test_expect_success '--committer-date-is-author-date works with apply backend' '
GIT_AUTHOR_DATE="@1234 +0300" git commit --amend --reset-author &&
git rebase --apply --committer-date-is-author-date HEAD^ &&
test_ctime_is_atime -1