diff options
| author | Rohit Ashiwal <rohit.ashiwal265@gmail.com> | 2019-11-01 19:30:02 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-11-02 15:37:12 +0900 |
| commit | 08187b4cbac2b2f870bb9c786d545b67f0262f74 (patch) | |
| tree | 3c983f7377480a3df4894ea1016d38fe798e7de8 /t | |
| parent | sequencer: rename amend_author to author_to_rename (diff) | |
| download | git-08187b4cbac2b2f870bb9c786d545b67f0262f74.tar.gz git-08187b4cbac2b2f870bb9c786d545b67f0262f74.zip | |
rebase -i: support --ignore-date
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>
Diffstat (limited to 't')
| -rwxr-xr-x | t/t3433-rebase-options-compatibility.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t3433-rebase-options-compatibility.sh b/t/t3433-rebase-options-compatibility.sh index a98cfe18b7..5166f158dd 100755 --- a/t/t3433-rebase-options-compatibility.sh +++ b/t/t3433-rebase-options-compatibility.sh @@ -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' ' + git checkout side && + git merge --no-ff commit3 && + git rebase -r --root --ignore-date && + git rev-list HEAD >rev_list && + while read HASH + do + git show $HASH --pretty="format:%ai" >authortime + grep "+0000" authortime + done <rev_list +' + test_done |
