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

[PATCH] t7609-merge-co-error-msgs: test non-fast forward case too.

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Sep 3, 2010, 15:25 UTC
Message-ID
<1283527533-16736-1-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<8762ymewq5.fsf@meyering.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
This comes on top of the patch serie, and adds a test to make sure the
bug doesn't come back.

I did check manually that the git of git.git doesn't pass this (while the one after the patch serie does).

 t/t7609-merge-co-error-msgs.sh |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/t/t7609-merge-co-error-msgs.sh b/t/t7609-merge-co-error-msgs.sh
index 1a109b4..6b58299 100755
--- a/t/t7609-merge-co-error-msgs.sh
+++ b/t/t7609-merge-co-error-msgs.sh
@@ -34,9 +34,17 @@ error: The following untracked working tree files would be overwritten by merge:
 Please move or remove them before you can merge.
 EOF
 
-test_expect_success 'untracked files overwritten by merge' '
+test_expect_success 'untracked files overwritten by merge (fast and non-fast forward)' '
 	test_must_fail git merge branch 2>out &&
-	test_cmp out expect
+	test_cmp out expect &&
+	git commit --allow-empty -m empty &&
+	(
+		GIT_MERGE_VERBOSITY=0 &&
+		export GIT_MERGE_VERBOSITY &&
+		test_must_fail git merge branch 2>out2
+	) &&
+	test_cmp out2 expect &&
+	git reset --hard HEAD^	
 '
 
 cat >expect <<\EOF
-- 
1.7.2.2.284.g95cc.dirty
Previous: Jim MeyeringNext: Matthieu Moy
Message 8 of 16 in “Re: [PATCH for next] insert missing newline in a diagnostic”
  1. Matthieu MoySep 1, 2010
  2. Make sure show_all_errors when using porcelain error messagesMatthieu Moy, Sep 1, 2010
  3. Junio C HamanoSep 1, 2010
  4. Matthieu MoySep 1, 2010
  5. Junio C HamanoSep 1, 2010
  6. 0/3 (hopefully) Proper fix to set show_all_errors where neededMatthieu Moy, Sep 2, 2010
  7. Jim MeyeringSep 3, 2010
  8. t7609-merge-co-error-msgs: test non-fast forward case too.Matthieu Moy, Sep 3, 2010
  9. 1/3 Move set_porcelain_error_msgs to unpack-trees.c and rename itMatthieu Moy, Sep 2, 2010
  10. 2/3 setup_unpack_trees_porcelain: take the whole options struct as parameterMatthieu Moy, Sep 2, 2010
  11. 3/3 Move "show_all_errors = 1" to setup_unpack_trees_porcelain()Matthieu Moy, Sep 2, 2010
  12. Junio C HamanoSep 2, 2010
  13. Matthieu MoySep 2, 2010
  14. Move "show_all_errors = 1" to setup_unpack_trees_porcelain()Matthieu Moy, Sep 2, 2010
  15. Jim MeyeringSep 2, 2010
  16. Matthieu MoySep 2, 2010

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.