]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3433-rebase-options-compatibility.sh
rebase -i: support --ignore-date
[thirdparty/git.git] / t / t3433-rebase-options-compatibility.sh
index a98cfe18b70008cf397f1740180dc3a311780401..5166f158dd80dd6e1cdb4f27b61f6d90f0d3e83a 100755 (executable)
@@ -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