From: Andy Koppe <andy.koppe@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, newren@gmail.com, Andy Koppe <andy.koppe@gmail.com>
Subject: [PATCH v4 3/4] rebase: test autosquash with and without -i
Date: Sat, 11 Nov 2023 13:27:17 +0000 [thread overview]
Message-ID: <20231111132720.78877-4-andy.koppe@gmail.com> (raw)
In-Reply-To: <20231111132720.78877-1-andy.koppe@gmail.com>
Amend t3415-rebase-autosquash.sh to test the --autosquash option and
rebase.autoSquash config with and without -i.
Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
---
t/t3415-rebase-autosquash.sh | 38 ++++++++++++++++++++++++++----------
1 file changed, 28 insertions(+), 10 deletions(-)
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index a364530d76..fcc40d6fe1 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -43,7 +43,7 @@ test_auto_fixup () {
git tag $1 &&
test_tick &&
- git rebase $2 -i HEAD^^^ &&
+ git rebase $2 HEAD^^^ &&
git log --oneline >actual &&
if test -n "$no_squash"
then
@@ -61,15 +61,24 @@ test_auto_fixup () {
}
test_expect_success 'auto fixup (option)' '
- test_auto_fixup final-fixup-option --autosquash
+ test_auto_fixup fixup-option --autosquash &&
+ test_auto_fixup fixup-option-i "--autosquash -i"
'
-test_expect_success 'auto fixup (config)' '
+test_expect_success 'auto fixup (config true)' '
git config rebase.autosquash true &&
- test_auto_fixup final-fixup-config-true &&
+ test_auto_fixup ! fixup-config-true &&
+ test_auto_fixup fixup-config-true-i -i &&
test_auto_fixup ! fixup-config-true-no --no-autosquash &&
+ test_auto_fixup ! fixup-config-true-i-no "-i --no-autosquash"
+'
+
+test_expect_success 'auto fixup (config false)' '
git config rebase.autosquash false &&
- test_auto_fixup ! final-fixup-config-false
+ test_auto_fixup ! fixup-config-false &&
+ test_auto_fixup ! fixup-config-false-i -i &&
+ test_auto_fixup fixup-config-false-yes --autosquash &&
+ test_auto_fixup fixup-config-false-i-yes "-i --autosquash"
'
test_auto_squash () {
@@ -87,7 +96,7 @@ test_auto_squash () {
git commit -m "squash! first" -m "extra para for first" &&
git tag $1 &&
test_tick &&
- git rebase $2 -i HEAD^^^ &&
+ git rebase $2 HEAD^^^ &&
git log --oneline >actual &&
if test -n "$no_squash"
then
@@ -105,15 +114,24 @@ test_auto_squash () {
}
test_expect_success 'auto squash (option)' '
- test_auto_squash final-squash --autosquash
+ test_auto_squash squash-option --autosquash &&
+ test_auto_squash squash-option-i "--autosquash -i"
'
-test_expect_success 'auto squash (config)' '
+test_expect_success 'auto squash (config true)' '
git config rebase.autosquash true &&
- test_auto_squash final-squash-config-true &&
+ test_auto_squash ! squash-config-true &&
+ test_auto_squash squash-config-true-i -i &&
test_auto_squash ! squash-config-true-no --no-autosquash &&
+ test_auto_squash ! squash-config-true-i-no "-i --no-autosquash"
+'
+
+test_expect_success 'auto squash (config false)' '
git config rebase.autosquash false &&
- test_auto_squash ! final-squash-config-false
+ test_auto_squash ! squash-config-false &&
+ test_auto_squash ! squash-config-false-i -i &&
+ test_auto_squash squash-config-false-yes --autosquash &&
+ test_auto_squash squash-config-false-i-yes "-i --autosquash"
'
test_expect_success 'misspelled auto squash' '
--
2.43.0-rc1
next prev parent reply other threads:[~2023-11-11 13:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 21:29 [PATCH 1/2] rebase: support non-interactive autosquash Andy Koppe
2023-11-03 21:29 ` [PATCH 2/2] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-04 1:19 ` [PATCH 1/2] rebase: support non-interactive autosquash Junio C Hamano
2023-11-04 22:05 ` Andy Koppe
2023-11-04 22:03 ` [PATCH v2 " Andy Koppe
2023-11-04 22:03 ` [PATCH v2 2/2] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-05 0:08 ` [PATCH v3 1/2] rebase: support non-interactive autosquash Andy Koppe
2023-11-05 0:08 ` [PATCH v3 2/2] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-06 11:07 ` Phillip Wood
2023-11-06 11:06 ` [PATCH v3 1/2] rebase: support non-interactive autosquash Phillip Wood
2023-11-11 14:08 ` Andy Koppe
2023-11-11 13:27 ` [PATCH v4 0/4] rebase: support --autosquash without -i Andy Koppe
2023-11-11 13:27 ` [PATCH v4 1/4] rebase: fully ignore rebase.autoSquash " Andy Koppe
2023-11-13 17:01 ` Phillip Wood
2023-11-11 13:27 ` [PATCH v4 2/4] rebase: support --autosquash " Andy Koppe
2023-11-13 17:01 ` Phillip Wood
2023-11-11 13:27 ` Andy Koppe [this message]
2023-11-13 1:20 ` [PATCH v4 3/4] rebase: test autosquash with and " Junio C Hamano
2023-11-13 17:02 ` Phillip Wood
2023-11-11 13:27 ` [PATCH v4 4/4] docs: rewrite rebase --(no-)autosquash description Andy Koppe
2023-11-11 13:33 ` Andy Koppe
2023-11-11 13:27 ` [PATCH v4 4/4] rebase: rewrite --(no-)autosquash documentation Andy Koppe
2023-11-13 1:21 ` Junio C Hamano
2023-11-13 17:02 ` Phillip Wood
2023-11-14 21:43 ` [PATCH v5 0/3] rebase: support --autosquash without -i Andy Koppe
2023-11-14 21:43 ` [PATCH v5 1/3] rebase: fully ignore rebase.autoSquash " Andy Koppe
2023-11-14 21:43 ` [PATCH v5 2/3] rebase: support --autosquash " Andy Koppe
2023-11-14 21:43 ` [PATCH v5 3/3] rebase: rewrite --(no-)autosquash documentation Andy Koppe
2023-11-15 15:09 ` [PATCH v5 0/3] rebase: support --autosquash without -i Phillip Wood
2023-11-16 0:27 ` Junio C Hamano
2023-11-06 0:50 ` [PATCH v2 1/2] rebase: support non-interactive autosquash Junio C Hamano
2023-11-11 14:26 ` Andy Koppe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231111132720.78877-4-andy.koppe@gmail.com \
--to=andy.koppe@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).