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

[PATCH v4 0/2] nd/merge-quit updates

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
May 18, 2019, 11:30 UTC
Message-ID
<20190518113043.18389-1-pclouds@gmail.com>
In-Reply-To
<20190514091322.12427-1-pclouds@gmail.com>
Another round because apparently the test case is not perfect.
Nguyễn Thái Ngọc Duy (2):
  merge: remove drop_save() in favor of remove_merge_branch_state()
  merge: add --quit
 Documentation/git-merge.txt |  4 ++++
 branch.c                    | 11 ++++++++---
 branch.h                    |  6 ++++++
 builtin/merge.c             | 30 ++++++++++++++++++------------
 t/t7600-merge.sh            | 26 ++++++++++++++++++++++++++
 5 files changed, 62 insertions(+), 15 deletions(-)
Interdiff dựa trên v3:
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index d453710ef6..625a24a980 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -823,17 +823,29 @@ test_expect_success EXECKEEPSPID 'killed merge can be completed with --continue'
 '
 
 test_expect_success 'merge --quit' '
-	git reset --hard c2 &&
-	test_must_fail git -c rerere.enabled=true merge master &&
-	test_path_is_file .git/MERGE_HEAD &&
-	test_path_is_file .git/MERGE_MODE &&
-	test_path_is_file .git/MERGE_MSG &&
-	test_path_is_file .git/MERGE_RR &&
-	git merge --quit &&
-	test_path_is_missing .git/MERGE_HEAD &&
-	test_path_is_missing .git/MERGE_MODE &&
-	test_path_is_missing .git/MERGE_MSG &&
-	test_path_is_missing .git/MERGE_RR
+	git init merge-quit &&
+	(
+		cd merge-quit &&
+		test_commit base &&
+		echo one >>base.t &&
+		git commit -am one &&
+		git branch one &&
+		git checkout base &&
+		echo two >>base.t &&
+		git commit -am two &&
+		test_must_fail git -c rerere.enabled=true merge one &&
+		test_path_is_file .git/MERGE_HEAD &&
+		test_path_is_file .git/MERGE_MODE &&
+		test_path_is_file .git/MERGE_MSG &&
+		git rerere status >rerere.before &&
+		git merge --quit &&
+		test_path_is_missing .git/MERGE_HEAD &&
+		test_path_is_missing .git/MERGE_MODE &&
+		test_path_is_missing .git/MERGE_MSG &&
+		git rerere status >rerere.after &&
+		test_must_be_empty rerere.after &&
+		! test_cmp rerere.after rerere.before
+	)
 '
 
 test_done
-- 
2.22.0.rc0.322.g2b0371e29a
Previous: Junio C HamanoNext: Nguyễn Thái Ngọc Duy
Message 16 of 20 in “Add "git merge --quit"”
  1. 0/2 Add "git merge --quit"Nguyễn Thái Ngọc Duy, May 1, 2019
  2. 1/2 merge: remove drop_save() in favor of remove_merge_branch_state()Nguyễn Thái Ngọc Duy, May 1, 2019
  3. 2/2 merge: add --quitNguyễn Thái Ngọc Duy, May 1, 2019
  4. Emily ShafferMay 2, 2019
  5. Phillip WoodMay 2, 2019
  6. 0/2 nd/merge-quit updateNguyễn Thái Ngọc Duy, May 9, 2019
  7. 1/2 merge: remove drop_save() in favor of remove_merge_branch_state()Nguyễn Thái Ngọc Duy, May 9, 2019
  8. 2/2 merge: add --quitNguyễn Thái Ngọc Duy, May 9, 2019
  9. 0/2 nd/merge-quit updatesNguyễn Thái Ngọc Duy, May 14, 2019
  10. 1/2 merge: remove drop_save() in favor of remove_merge_branch_state()Nguyễn Thái Ngọc Duy, May 14, 2019
  11. 2/2 merge: add --quitNguyễn Thái Ngọc Duy, May 14, 2019
  12. Johannes SchindelinMay 14, 2019
  13. Junio C HamanoMay 15, 2019
  14. Johannes SchindelinMay 15, 2019
  15. Junio C HamanoMay 15, 2019
  16. 0/2 nd/merge-quit updatesNguyễn Thái Ngọc Duy, May 18, 2019
  17. 1/2 merge: remove drop_save() in favor of remove_merge_branch_state()Nguyễn Thái Ngọc Duy, May 18, 2019
  18. 2/2 merge: add --quitNguyễn Thái Ngọc Duy, May 18, 2019
  19. Johannes SchindelinMay 20, 2019
  20. Johannes SchindelinMay 20, 2019

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.