rebase am already has this flag to "lie" about the author date
by changing it to the committer (current) date. Let's add the same
for interactive machinery.
Signed-off-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Rohit Ashiwal5 years agocommitted byJunio C Hamano
@ -555,6 +554,7 @@ In addition, the following pairs of options are incompatible:
@@ -555,6 +554,7 @@ In addition, the following pairs of options are incompatible:
* --preserve-merges and --rebase-merges
* --preserve-merges and --ignore-whitespace
* --preserve-merges and --committer-date-is-author-date
@ -99,4 +99,33 @@ test_expect_success '--committer-date-is-author-date works with rebase -r' '
@@ -99,4 +99,33 @@ test_expect_success '--committer-date-is-author-date works with rebase -r' '
done <rev_list
'
# Checking for +0000 in author time is enough since default
# timezone is UTC, but the timezone used while committing
# sets to +0530.
test_expect_success '--ignore-date works with am backend' '
git commit --amend --date="$GIT_AUTHOR_DATE" &&
git rebase --ignore-date HEAD^ &&
git show HEAD --pretty="format:%ai" >authortime &&
grep "+0000" authortime
'
test_expect_success '--ignore-date works with interactive backend' '
git commit --amend --date="$GIT_AUTHOR_DATE" &&
git rebase --ignore-date -i HEAD^ &&
git show HEAD --pretty="format:%ai" >authortime &&
grep "+0000" authortime
'
test_expect_success '--ignore-date works with rebase -r' '