@@ -82,6 +82,20 @@ test_expect_success '--committer-date-is-author-date works with merge backend' '
82
82
test_ctime_is_atime -1
83
83
'
84
84
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
+
85
99
test_expect_success ' --committer-date-is-author-date works with rebase -r' '
86
100
git checkout side &&
87
101
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
155
169
test_atime_is_ignored -2
156
170
'
157
171
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
+
158
187
test_expect_success ' --reset-author-date --committer-date-is-author-date works when forking merge' '
159
188
GIT_SEQUENCE_EDITOR="echo \"merge -C $(git rev-parse HEAD) commit3\">" \
160
189
PATH="./test-bin:$PATH" git rebase -i --strategy=test \
0 commit comments