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

[PATCH v4 2/4] notes: add tests for --commit/--abort/--strategy exclusivity

From
Jacob Keller <jacob.e.keller@intel.com>
Date
Aug 11, 2015, 20:57 UTC
Message-ID
<1439326641-9447-3-git-send-email-jacob.e.keller@intel.com>
In-Reply-To
<1439326641-9447-1-git-send-email-jacob.e.keller@intel.com>
From: Jacob Keller <jacob.keller@gmail.com>

Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
---
 t/t3310-notes-merge-manual-resolve.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-notes-merge-manual-resolve.sh
index 195bb97f859d..d5572121da69 100755
--- a/t/t3310-notes-merge-manual-resolve.sh
+++ b/t/t3310-notes-merge-manual-resolve.sh
@@ -314,6 +314,18 @@ y and z notes on 1st commit
 
 EOF
 
+test_expect_success 'do not allow mixing --commit and --abort' '
+	test_must_fail git notes merge --commit --abort
+'
+
+test_expect_success 'do not allow mixing --commit and --strategy' '
+	test_must_fail git notes merge --commit --strategy theirs
+'
+
+test_expect_success 'do not allow mixing --abort and --strategy' '
+	test_must_fail git notes merge --abort --strategy theirs
+'
+
 test_expect_success 'finalize conflicting merge (z => m)' '
 	# Resolve conflicts and finalize merge
 	cat >.git/NOTES_MERGE_WORKTREE/$commit_sha1 <<EOF &&
-- 
2.5.0.482.gfcd5645
Previous: Johan HerlandNext: Johan Herland
Message 4 of 21 in “add notes strategy configuration options”
  1. 0/4 add notes strategy configuration optionsJacob Keller, Aug 11, 2015
  2. 1/4 notes: document cat_sort_uniq rewriteModeJacob Keller, Aug 11, 2015
  3. Johan HerlandAug 12, 2015
  4. 2/4 notes: add tests for --commit/--abort/--strategy exclusivityJacob Keller, Aug 11, 2015
  5. Johan HerlandAug 12, 2015
  6. 3/4 notes: add notes.merge option to select default strategyJacob Keller, Aug 11, 2015
  7. Johan HerlandAug 12, 2015
  8. 4/4 notes: teach git-notes about notes.<ref>.merge optionJacob Keller, Aug 11, 2015
  9. Eric SunshineAug 12, 2015
  10. Johan HerlandAug 12, 2015
  11. Junio C HamanoAug 12, 2015
  12. Jacob KellerAug 12, 2015
  13. Junio C HamanoAug 12, 2015
  14. Jacob KellerAug 12, 2015
  15. Jacob KellerAug 12, 2015
  16. Johan HerlandAug 12, 2015
  17. Johan HerlandAug 12, 2015
  18. Jacob KellerAug 12, 2015
  19. Jacob KellerAug 12, 2015
  20. Junio C HamanoAug 12, 2015
  21. Jacob KellerAug 12, 2015

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.