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

[PATCH mz/rebase-tests] rebase topology tests: fix commit names on case-insensitive file systems

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jun 18, 2013, 07:28 UTC
Message-ID
<51C00C07.6080600@viscovery.net>
In-Reply-To
<1370585503-11374-1-git-send-email-martinvonz@gmail.com>
From: Johannes Sixt <j6t@kdbg.org>

The recently introduced tests used uppercase letters to denote cherry-picks of commits having the corresponding lowercase letter names. The helper functions also set up tags with the names of the commits.

But this constellation fails on case-insensitive file systems because there cannot be distinct tags with names that differ only in case.

Use a less subtle convention for the names of cherry-picked commits.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 Knowing that the tests would take their time to complete on Windows,
 today was the first time I ran them, and there were some unexpected
 issues. Fixed by this patch.
 t/t3421-rebase-topology-linear.sh | 20 ++++++++++----------
 t/t3425-rebase-topology-merges.sh | 16 ++++++++--------
 2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/t/t3421-rebase-topology-linear.sh b/t/t3421-rebase-topology-linear.sh
index e67add6..9c55cba 100755
--- a/t/t3421-rebase-topology-linear.sh
+++ b/t/t3421-rebase-topology-linear.sh
@@ -79,9 +79,9 @@ test_run_rebase success -p
 #      /
 # a---b---c---g---h
 #      \
-#       d---G---i
+#       d---gp--i
 #
-# uppercase = cherry-picked
+# gp = cherry-picked g
 # h = reverted g
 #
 # Reverted patches are there for tests to be able to check if a commit
@@ -94,7 +94,7 @@ test_expect_success 'setup of linear history for range selection tests' '
 	test_commit g &&
 	revert h g &&
 	git checkout d &&
-	cherry_pick G g &&
+	cherry_pick gp g &&
 	test_commit i &&
 	git checkout b &&
 	test_commit f
@@ -120,7 +120,7 @@ test_run_rebase () {
 	shift
 	test_expect_$result "rebase $* can drop last patch if in upstream" "
 		reset_rebase &&
-		git rebase $* h G &&
+		git rebase $* h gp &&
 		test_cmp_rev h HEAD^ &&
 		test_linear_range 'd' h..
 	"
@@ -152,7 +152,7 @@ test_run_rebase () {
 		reset_rebase &&
 		git rebase $* --onto h f i &&
 		test_cmp_rev h HEAD~3 &&
-		test_linear_range 'd G i' h..
+		test_linear_range 'd gp i' h..
 	"
 }
 test_run_rebase success ''
@@ -222,9 +222,9 @@ test_run_rebase failure -p
 #      /
 # a---b---c---g
 #
-# x---y---B
+# x---y---bp
 #
-# uppercase = cherry-picked
+# bp = cherry-picked b
 # m = reverted b
 #
 # Reverted patches are there for tests to be able to check if a commit
@@ -239,7 +239,7 @@ test_expect_success 'setup of linear history for test involving root' '
 	git rm -rf . &&
 	test_commit x &&
 	test_commit y &&
-	cherry_pick B b
+	cherry_pick bp b
 '
 
 test_run_rebase () {
@@ -277,7 +277,7 @@ test_run_rebase () {
 	shift
 	test_expect_$result "rebase $* --onto --root drops patch in onto" "
 		reset_rebase &&
-		git rebase $* --onto m --root B &&
+		git rebase $* --onto m --root bp &&
 		test_cmp_rev m HEAD~2 &&
 		test_linear_range 'x y' m..
 	"
@@ -308,7 +308,7 @@ test_run_rebase () {
 	shift
 	test_expect_$result "rebase $* without --onto --root with disjoint history drops patch in onto" "
 		reset_rebase &&
-		git rebase $* m B &&
+		git rebase $* m bp &&
 		test_cmp_rev m HEAD~2 &&
 		test_linear_range 'x y' m..
 	"
diff --git a/t/t3425-rebase-topology-merges.sh b/t/t3425-rebase-topology-merges.sh
index 5400a05..1d195fb 100755
--- a/t/t3425-rebase-topology-merges.sh
+++ b/t/t3425-rebase-topology-merges.sh
@@ -30,7 +30,7 @@ test_expect_success 'setup of non-linear-history' '
 	test_commit g &&
 	revert h g &&
 	git checkout d &&
-	cherry_pick G g &&
+	cherry_pick gp g &&
 	test_commit i &&
 	git checkout b &&
 	test_commit f
@@ -154,11 +154,11 @@ test_expect_success "rebase -p can re-create two branches on onto" "
 #      /
 # a---b---c---g---h
 #      \
-#       d---G---i
+#       d---gp--i
 #        \       \
 #         e-------u
 #
-# uppercase = cherry-picked
+# gp = cherry-picked g
 # h = reverted g
 test_expect_success 'setup of non-linear-history for patch-equivalence tests' '
 	git checkout e &&
@@ -186,24 +186,24 @@ test_expect_success "rebase -p --onto in merged history does not drop patches in
 	git rebase -p --onto h f u &&
 	test_cmp_rev h HEAD~3 &&
 	test_cmp_rev HEAD^2~2 HEAD~2 &&
-	test_revision_subjects 'd G i e u' HEAD~2 HEAD^2^ HEAD^2 HEAD^ HEAD
+	test_revision_subjects 'd gp i e u' HEAD~2 HEAD^2^ HEAD^2 HEAD^ HEAD
 "
 
 # a---b---c---g---h
 #      \
-#       d---G---s
+#       d---gp--s
 #        \   \ /
 #         \   X
 #          \ / \
 #           e---t
 #
-# uppercase = cherry-picked
+# gp = cherry-picked g
 # h = reverted g
 test_expect_success 'setup of non-linear-history for dropping whole side' '
-	git checkout G &&
+	git checkout gp &&
 	test_merge s e &&
 	git checkout e &&
-	test_merge t G
+	test_merge t gp
 '
 
 test_expect_failure "rebase -p drops merge commit when entire first-parent side is dropped" "
-- 
1.8.3.1.1749.g223650b
Previous: Johannes SixtNext: Junio C Hamano
Message 72 of 75 in “add t3420-rebase-topology”
  1. add t3420-rebase-topologyMartin von Zweigbergk, Sep 18, 2012
  2. Junio C HamanoSep 18, 2012
  3. Martin von ZweigbergkSep 21, 2012
  4. Johannes SixtSep 18, 2012
  5. Martin von ZweigbergkSep 26, 2012
  6. Chris WebbSep 27, 2012
  7. Martin von ZweigbergkSep 28, 2012
  8. Chris WebbSep 29, 2012
  9. 0/7 Rebase topology testMartin von Zweigbergk, May 29, 2013
  10. 1/7 add simple tests of consistency across rebase typesMartin von Zweigbergk, May 29, 2013
  11. Martin von ZweigbergkJun 3, 2013
  12. Junio C HamanoJun 3, 2013
  13. Martin von ZweigbergkJun 3, 2013
  14. 2/7 add tests for rebasing with patch-equivalence presentMartin von Zweigbergk, May 29, 2013
  15. Johannes SixtMay 29, 2013
  16. Martin von ZweigbergkMay 30, 2013
  17. Felipe ContrerasMay 30, 2013
  18. Martin von ZweigbergkMay 30, 2013
  19. Felipe ContrerasMay 30, 2013
  20. Martin von ZweigbergkMay 30, 2013
  21. Johannes SixtMay 30, 2013
  22. Martin von ZweigbergkMay 30, 2013
  23. 3/7 add tests for rebasing of empty commitsMartin von Zweigbergk, May 29, 2013
  24. 4/7 add tests for rebasing rootMartin von Zweigbergk, May 29, 2013
  25. Johannes SixtMay 29, 2013
  26. Martin von ZweigbergkMay 30, 2013
  27. 5/7 add tests for rebasing merged historyMartin von Zweigbergk, May 29, 2013
  28. Johannes SixtMay 29, 2013
  29. Martin von ZweigbergkMay 31, 2013
  30. Johannes SixtMay 29, 2013
  31. 6/7 t3406: modernize styleMartin von Zweigbergk, May 29, 2013
  32. 7/7 tests: move test for rebase messages from t3400 to t3406Martin von Zweigbergk, May 29, 2013
  33. Felipe ContrerasMay 29, 2013
  34. Ramkumar RamachandraMay 29, 2013
  35. Felipe ContrerasMay 29, 2013
  36. 0/7 Rebase topology testMartin von Zweigbergk, May 31, 2013
  37. 1/7 add simple tests of consistency across rebase typesMartin von Zweigbergk, May 31, 2013
  38. 2/7 add tests for rebasing with patch-equivalence presentMartin von Zweigbergk, May 31, 2013
  39. 3/7 add tests for rebasing of empty commitsMartin von Zweigbergk, May 31, 2013
  40. 4/7 add tests for rebasing rootMartin von Zweigbergk, May 31, 2013
  41. 5/7 add tests for rebasing merged historyMartin von Zweigbergk, May 31, 2013
  42. Johannes SixtMay 31, 2013
  43. 5/7 add tests for rebasing merged historyMartin von Zweigbergk, Jun 1, 2013
  44. 6/7 t3406: modernize styleMartin von Zweigbergk, May 31, 2013
  45. 7/7 tests: move test for rebase messages from t3400 to t3406Martin von Zweigbergk, May 31, 2013
  46. 0/7 Rebase topology testMartin von Zweigbergk, Jun 3, 2013
  47. 1/7 add simple tests of consistency across rebase typesMartin von Zweigbergk, Jun 3, 2013
  48. Junio C HamanoJun 3, 2013
  49. Martin von ZweigbergkJun 4, 2013
  50. Junio C HamanoJun 4, 2013
  51. Johannes SixtJun 4, 2013
  52. Martin von ZweigbergkJun 5, 2013
  53. 2/7 add tests for rebasing with patch-equivalence presentMartin von Zweigbergk, Jun 3, 2013
  54. 3/7 add tests for rebasing of empty commitsMartin von Zweigbergk, Jun 3, 2013
  55. 4/7 add tests for rebasing rootMartin von Zweigbergk, Jun 3, 2013
  56. 5/7 add tests for rebasing merged historyMartin von Zweigbergk, Jun 3, 2013
  57. Junio C HamanoJun 4, 2013
  58. Martin von ZweigbergkJun 5, 2013
  59. Johannes SixtJun 5, 2013
  60. 6/7 t3406: modernize styleMartin von Zweigbergk, Jun 3, 2013
  61. 7/7 tests: move test for rebase messages from t3400 to t3406Martin von Zweigbergk, Jun 3, 2013
  62. 0/8 Rebase topology testMartin von Zweigbergk, Jun 7, 2013
  63. 1/7 add simple tests of consistency across rebase typesMartin von Zweigbergk, Jun 7, 2013
  64. 2/7 add tests for rebasing with patch-equivalence presentMartin von Zweigbergk, Jun 7, 2013
  65. 3/7 add tests for rebasing of empty commitsMartin von Zweigbergk, Jun 7, 2013
  66. 4/7 add tests for rebasing rootMartin von Zweigbergk, Jun 7, 2013
  67. 5/7 add tests for rebasing merged historyMartin von Zweigbergk, Jun 7, 2013
  68. 6/7 t3406: modernize styleMartin von Zweigbergk, Jun 7, 2013
  69. 7/7 tests: move test for rebase messages from t3400 to t3406Martin von Zweigbergk, Jun 7, 2013
  70. Junio C HamanoJun 7, 2013
  71. Johannes SixtJun 7, 2013
  72. rebase topology tests: fix commit names on case-insensitive file systemsJohannes Sixt, Jun 18, 2013
  73. Junio C HamanoJun 18, 2013
  74. Martin von ZweigbergkJun 18, 2013
  75. Johannes SixtJun 19, 2013

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.