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

[PATCHv3 1/2] t3404: Use test_commit to set up test repository

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Dec 7, 2009, 09:20 UTC
Message-ID
<1b82a55c2a45b8f40ac0fe42d4ce2a55e72a2557.1260177312.git.mhagger@alum.mit.edu>
In-Reply-To
<7vskbn9s1k.fsf@alter.siamese.dyndns.org>

Also adjust "expected" text to reflect the file contents generated by test_commit, which are slightly different than those generated by the old code.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 t/t3404-rebase-interactive.sh |   66 ++++++++++++----------------------------
 1 files changed, 20 insertions(+), 46 deletions(-)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 3a37793..778daf4 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -16,53 +16,26 @@ set_fake_editor
 
 # set up two branches like this:
 #
-# A - B - C - D - E
+# A - B - C - D - E     (master)
 #   \
-#     F - G - H
+#     F - G - H         (branch1)
 #       \
-#         I
+#         I             (branch2)
 #
-# where B, D and G touch the same file.
+# where A, B, D and G touch the same file.
 
 test_expect_success 'setup' '
-	: > file1 &&
-	git add file1 &&
-	test_tick &&
-	git commit -m A &&
-	git tag A &&
-	echo 1 > file1 &&
-	test_tick &&
-	git commit -m B file1 &&
-	: > file2 &&
-	git add file2 &&
-	test_tick &&
-	git commit -m C &&
-	echo 2 > file1 &&
-	test_tick &&
-	git commit -m D file1 &&
-	: > file3 &&
-	git add file3 &&
-	test_tick &&
-	git commit -m E &&
+	test_commit A file1 &&
+	test_commit B file1 &&
+	test_commit C file2 &&
+	test_commit D file1 &&
+	test_commit E file3 &&
 	git checkout -b branch1 A &&
-	: > file4 &&
-	git add file4 &&
-	test_tick &&
-	git commit -m F &&
-	git tag F &&
-	echo 3 > file1 &&
-	test_tick &&
-	git commit -m G file1 &&
-	: > file5 &&
-	git add file5 &&
-	test_tick &&
-	git commit -m H &&
+	test_commit F file4 &&
+	test_commit G file1 &&
+	test_commit H file5 &&
 	git checkout -b branch2 F &&
-	: > file6 &&
-	git add file6 &&
-	test_tick &&
-	git commit -m I &&
-	git tag I
+	test_commit I file6
 '
 
 test_expect_success 'no changes are a nop' '
@@ -111,19 +84,20 @@ test_expect_success 'exchange two commits' '
 
 cat > expect << EOF
 diff --git a/file1 b/file1
-index e69de29..00750ed 100644
+index f70f10e..fd79235 100644
 --- a/file1
 +++ b/file1
-@@ -0,0 +1 @@
-+3
+@@ -1 +1 @@
+-A
++G
 EOF
 
 cat > expect2 << EOF
 <<<<<<< HEAD
-2
+D
 =======
-3
->>>>>>> b7ca976... G
+G
+>>>>>>> 91201e5... G
 EOF
 
 test_expect_success 'stop on conflicting pick' '
-- 
1.6.5.5
Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 13 in “[PATCHv2 0/2] Add a "fixup" command to "rebase --interactive"”
  1. Michael HaggertyDec 7, 2009
  2. 1/2 t3404: Use test_commit to set up test repositoryMichael Haggerty, Dec 7, 2009
  3. 2/2 Add a command "fixup" to rebase --interactiveMichael Haggerty, Dec 7, 2009
  4. Junio C HamanoDec 7, 2009
  5. 0/2 Add a "fixup" command to "rebase --interactive"Michael Haggerty, Dec 7, 2009
  6. Johannes SchindelinDec 7, 2009
  7. 1/2 t3404: Use test_commit to set up test repositoryMichael Haggerty, Dec 7, 2009
  8. Junio C HamanoDec 8, 2009
  9. 2/2 Add a command "fixup" to rebase --interactiveMichael Haggerty, Dec 7, 2009
  10. Sverre RabbelierDec 7, 2009
  11. Michael HaggertyDec 7, 2009
  12. Matthieu MoyDec 7, 2009
  13. Sverre RabbelierDec 7, 2009

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.