git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] rebase: remove a couple of redundant strategy tests

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Mar 15, 2023, 15:14 UTC
Message-ID
<3e02eeff78b23711187de47a1a820f9bde683200.1678893298.git.phillip.wood@dunelm.org.uk>
In-Reply-To
<cover.1678893298.git.phillip.wood@dunelm.org.uk>
From: Phillip Wood <phillip.wood@dunelm.org.uk>

The test removed in t3402 has been redundant ever since 80ff47957b (rebase: remember strategy and strategy options, 2011-02-06) which added a new test the first part of which (as noted in the commit message) duplicated the existing test. The test removed in t3418 has been redundant since the merge backend was removed in 68aa495b59 (rebase: implement --merge via the interactive machinery, 2018-12-11) as it now tests the same code paths as the preceding test.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
 t/t3402-rebase-merge.sh    | 21 ---------------------
 t/t3418-rebase-continue.sh | 32 --------------------------------
 2 files changed, 53 deletions(-)
diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh
index 7e46f4ca85..79b0640c00 100755
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
@@ -131,27 +131,6 @@ test_expect_success 'picking rebase' '
 	esac
 '
 
-test_expect_success 'rebase -s funny -Xopt' '
-	test_when_finished "rm -fr test-bin funny.was.run" &&
-	mkdir test-bin &&
-	cat >test-bin/git-merge-funny <<-EOF &&
-	#!$SHELL_PATH
-	case "\$1" in --opt) ;; *) exit 2 ;; esac
-	shift &&
-	>funny.was.run &&
-	exec git merge-recursive "\$@"
-	EOF
-	chmod +x test-bin/git-merge-funny &&
-	git reset --hard &&
-	git checkout -b test-funny main^ &&
-	test_commit funny &&
-	(
-		PATH=./test-bin:$PATH &&
-		git rebase -s funny -Xopt main
-	) &&
-	test -f funny.was.run
-'
-
 test_expect_success 'rebase --skip works with two conflicts in a row' '
 	git checkout second-side  &&
 	tr "[A-Z]" "[a-z]" <newfile >tmp &&
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 42c3954125..2d0789e554 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -97,38 +97,6 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
 	test_cmp expect actual
 '
 
-test_expect_success 'rebase -i --continue handles merge strategy and options' '
-	rm -fr .git/rebase-* &&
-	git reset --hard commit-new-file-F2-on-topic-branch &&
-	test_commit "commit-new-file-F3-on-topic-branch-for-dash-i" F3 32 &&
-	test_when_finished "rm -fr test-bin funny.was.run funny.args" &&
-	mkdir test-bin &&
-	cat >test-bin/git-merge-funny <<-EOF &&
-	#!$SHELL_PATH
-	echo "\$@" >>funny.args
-	case "\$1" in --opt) ;; *) exit 2 ;; esac
-	case "\$2" in --foo) ;; *) exit 2 ;; esac
-	case "\$4" in --) ;; *) exit 2 ;; esac
-	shift 2 &&
-	>funny.was.run &&
-	exec git merge-recursive "\$@"
-	EOF
-	chmod +x test-bin/git-merge-funny &&
-	(
-		PATH=./test-bin:$PATH &&
-		test_must_fail git rebase -i -s funny -Xopt -Xfoo main topic
-	) &&
-	test -f funny.was.run &&
-	rm funny.was.run &&
-	echo "Resolved" >F2 &&
-	git add F2 &&
-	(
-		PATH=./test-bin:$PATH &&
-		git rebase --continue
-	) &&
-	test -f funny.was.run
-'
-
 test_expect_success 'rebase -r passes merge strategy options correctly' '
 	rm -fr .git/rebase-* &&
 	git reset --hard commit-new-file-F3-on-topic-branch &&
-- 
2.39.2
Previous: Phillip WoodNext: Elijah Newren
Message 7 of 36 in “rebase: cleanup merge strategy option handling”
  1. 0/4 rebase: cleanup merge strategy option handlingPhillip Wood, Mar 15, 2023
  2. 1/4 rebase: stop reading and writing unnecessary strategy statePhillip Wood, Mar 15, 2023
  3. 2/4 rebase -m: cleanup --strategy-option handlingPhillip Wood, Mar 15, 2023
  4. 3/4 rebase -m: fix serialization of strategy optionsPhillip Wood, Mar 15, 2023
  5. Elijah NewrenApr 1, 2023
  6. Phillip WoodApr 4, 2023
  7. 4/4 rebase: remove a couple of redundant strategy testsPhillip Wood, Mar 15, 2023
  8. Elijah NewrenApr 1, 2023
  9. Phillip WoodApr 4, 2023
  10. Junio C HamanoMar 15, 2023
  11. Felipe ContrerasMar 15, 2023
  12. Elijah NewrenApr 1, 2023
  13. 0/5 rebase: cleanup merge strategy option handlingPhillip Wood, Apr 5, 2023
  14. 1/5 rebase: stop reading and writing unnecessary strategy statePhillip Wood, Apr 5, 2023
  15. 3/5 rebase -m: cleanup --strategy-option handlingPhillip Wood, Apr 5, 2023
  16. 2/5 sequencer: use struct strvec to store merge strategy optionsPhillip Wood, Apr 5, 2023
  17. Elijah NewrenApr 7, 2023
  18. 4/5 rebase -m: fix serialization of strategy optionsPhillip Wood, Apr 5, 2023
  19. Elijah NewrenApr 7, 2023
  20. 5/5 rebase: remove a couple of redundant strategy testsPhillip Wood, Apr 5, 2023
  21. Elijah NewrenApr 7, 2023
  22. Phillip WoodApr 7, 2023
  23. Junio C HamanoApr 7, 2023
  24. 0/5 rebase: cleanup merge strategy option handlingPhillip Wood, Apr 7, 2023
  25. 1/5 rebase: stop reading and writing unnecessary strategy statePhillip Wood, Apr 7, 2023
  26. 2/5 sequencer: use struct strvec to store merge strategy optionsPhillip Wood, Apr 7, 2023
  27. 3/5 rebase -m: cleanup --strategy-option handlingPhillip Wood, Apr 7, 2023
  28. 4/5 rebase -m: fix serialization of strategy optionsPhillip Wood, Apr 7, 2023
  29. 5/5 rebase: remove a couple of redundant strategy testsPhillip Wood, Apr 7, 2023
  30. 0/5 rebase: cleanup merge strategy option handlingPhillip Wood, Apr 10, 2023
  31. 1/5 rebase: stop reading and writing unnecessary strategy statePhillip Wood, Apr 10, 2023
  32. 3/5 rebase -m: cleanup --strategy-option handlingPhillip Wood, Apr 10, 2023
  33. 2/5 sequencer: use struct strvec to store merge strategy optionsPhillip Wood, Apr 10, 2023
  34. 4/5 rebase -m: fix serialization of strategy optionsPhillip Wood, Apr 10, 2023
  35. 5/5 rebase: remove a couple of redundant strategy testsPhillip Wood, Apr 10, 2023
  36. Elijah NewrenApr 10, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.