@@ -82,6 +82,20 @@ test_expect_success '--committer-date-is-author-date works with merge backend' '
8282 test_ctime_is_atime -1
8383'
8484
85+ test_expect_success ' --committer-date-is-author-date works when rewording' '
86+ GIT_AUTHOR_DATE="@1234 +0300" git commit --amend --reset-author &&
87+ (
88+ set_fake_editor &&
89+ FAKE_COMMIT_MESSAGE=edited \
90+ FAKE_LINES="reword 1" \
91+ git rebase -i --committer-date-is-author-date HEAD^
92+ ) &&
93+ test_write_lines edited "" >expect &&
94+ git log --format="%B" -1 >actual &&
95+ test_cmp expect actual &&
96+ test_ctime_is_atime -1
97+ '
98+
8599test_expect_success ' --committer-date-is-author-date works with rebase -r' '
86100 git checkout side &&
87101 GIT_AUTHOR_DATE="@1234 +0300" git merge --no-ff commit3 &&
@@ -155,6 +169,21 @@ test_expect_success '--reset-author-date with --committer-date-is-author-date wo
155169 test_atime_is_ignored -2
156170'
157171
172+ test_expect_success ' reset-author-date with --committer-date-is-author-date works when rewording' '
173+ GIT_AUTHOR_DATE="@1234 +0300" git commit --amend --reset-author &&
174+ (
175+ set_fake_editor &&
176+ FAKE_COMMIT_MESSAGE=edited \
177+ FAKE_LINES="reword 1" \
178+ git rebase -i --committer-date-is-author-date \
179+ --reset-author-date HEAD^
180+ ) &&
181+ test_write_lines edited "" >expect &&
182+ git log --format="%B" -1 >actual &&
183+ test_cmp expect actual &&
184+ test_atime_is_ignored -1
185+ '
186+
158187test_expect_success ' --reset-author-date --committer-date-is-author-date works when forking merge' '
159188 GIT_SEQUENCE_EDITOR="echo \"merge -C $(git rev-parse HEAD) commit3\">" \
160189 PATH="./test-bin:$PATH" git rebase -i --strategy=test \
0 commit comments