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

[PATCH v15 21/27] bisect--helper: retire `--write-terms` subcommand

From
Pranit Bauva <pranit.bauva@gmail.com>
Date
Oct 14, 2016, 14:14 UTC
Message-ID
<01020157c38b1b37-aedbfacb-8369-4a71-830e-a6b47ee0b0cd-000000@eu-west-1.amazonses.com>
In-Reply-To
<01020157c38b19e0-81123fa5-5d9d-4f64-8f1b-ff336e83ebe4-000000@eu-west-1.amazonses.com>

The `--write-terms` subcommand is no longer used in the shell script and the function `write_terms()` is called from the C implementation of `set_terms()` and `bisect_start()`.

Mentored-by: Lars Schneider <larsxschneider@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
---
 builtin/bisect--helper.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index d5fe35b..493034c 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -20,7 +20,6 @@ static GIT_PATH_FUNC(git_path_head_name, "head-name")
 static GIT_PATH_FUNC(git_path_bisect_names, "BISECT_NAMES")
 
 static const char * const git_bisect_helper_usage[] = {
-	N_("git bisect--helper --write-terms <bad_term> <good_term>"),
 	N_("git bisect--helper --bisect-reset [<commit>]"),
 	N_("git bisect--helper --bisect-write <state> <revision> <TERM_GOOD> <TERM_BAD> [<nolog>]"),
 	N_("git bisect--helper --bisect-check-and-set-terms <command> <TERM_GOOD> <TERM_BAD>"),
@@ -862,8 +861,7 @@ static int bisect_state(struct bisect_terms *terms, const char **argv,
 int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 {
 	enum {
-		WRITE_TERMS = 1,
-		BISECT_RESET,
+		BISECT_RESET = 1,
 		BISECT_WRITE,
 		CHECK_AND_SET_TERMS,
 		BISECT_NEXT_CHECK,
@@ -876,8 +874,6 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 	} cmdmode = 0;
 	int no_checkout = 0, res = 0;
 	struct option options[] = {
-		OPT_CMDMODE(0, "write-terms", &cmdmode,
-			 N_("write the terms to .git/BISECT_TERMS"), WRITE_TERMS),
 		OPT_CMDMODE(0, "bisect-reset", &cmdmode,
 			 N_("reset the bisection state"), BISECT_RESET),
 		OPT_CMDMODE(0, "bisect-write", &cmdmode,
@@ -913,11 +909,6 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 
 	switch (cmdmode) {
 	int nolog;
-	case WRITE_TERMS:
-		if (argc != 2)
-			die(_("--write-terms requires two arguments"));
-		res = write_terms(argv[0], argv[1]);
-		break;
 	case BISECT_RESET:
 		if (argc > 1)
 			die(_("--bisect-reset requires either zero or one arguments"));

--
https://github.com/git/git/pull/287
Previous: Pranit BauvaNext: Pranit Bauva
Message 38 of 82 in “bisect--helper: use OPT_CMDMODE instead of OPT_BOOL”
  1. 01/27 bisect--helper: use OPT_CMDMODE instead of OPT_BOOLPranit Bauva, Oct 14, 2016
  2. 06/27 wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()Pranit Bauva, Oct 14, 2016
  3. 05/27 t6030: explicitly test for bisection cleanupPranit Bauva, Oct 14, 2016
  4. 22/27 bisect--helper: `bisect_log` shell function in CPranit Bauva, Oct 14, 2016
  5. Stephan BeyerNov 17, 2016
  6. Pranit BauvaDec 6, 2016
  7. 10/27 bisect--helper: `check_and_set_terms` shell function in CPranit Bauva, Oct 14, 2016
  8. Stephan BeyerNov 17, 2016
  9. Pranit BauvaDec 6, 2016
  10. 23/27 bisect--helper: `bisect_replay` shell function in CPranit Bauva, Oct 14, 2016
  11. Stephan BeyerNov 22, 2016
  12. Pranit BauvaDec 6, 2016
  13. Stephan BeyerDec 6, 2016
  14. Stephan BeyerDec 6, 2016
  15. Christian CouderDec 7, 2016
  16. 04/27 bisect--helper: `bisect_clean_state` shell function in CPranit Bauva, Oct 14, 2016
  17. Stephan BeyerNov 15, 2016
  18. Junio C HamanoNov 15, 2016
  19. Stephan BeyerNov 15, 2016
  20. Pranit BauvaNov 16, 2016
  21. 09/27 bisect--helper: `bisect_write` shell function in CPranit Bauva, Oct 14, 2016
  22. Stephan BeyerNov 17, 2016
  23. Pranit BauvaDec 6, 2016
  24. 20/27 bisect--helper: retire `--check-expected-revs` subcommandPranit Bauva, Oct 14, 2016
  25. 12/27 bisect--helper: `get_terms` & `bisect_terms` shell function in CPranit Bauva, Oct 14, 2016
  26. Stephan BeyerNov 17, 2016
  27. Pranit BauvaDec 6, 2016
  28. Stephan BeyerDec 6, 2016
  29. Pranit BauvaDec 7, 2016
  30. 13/27 bisect--helper: `bisect_start` shell function partially in CPranit Bauva, Oct 14, 2016
  31. Stephan BeyerNov 15, 2016
  32. Pranit BauvaNov 16, 2016
  33. Stephan BeyerNov 20, 2016
  34. Stephan BeyerNov 20, 2016
  35. 18/27 bisect--helper: `bisect_autostart` shell function in CPranit Bauva, Oct 14, 2016
  36. Stephan BeyerNov 20, 2016
  37. Pranit BauvaDec 6, 2016
  38. 21/27 bisect--helper: retire `--write-terms` subcommandPranit Bauva, Oct 14, 2016
  39. 19/27 bisect--helper: `bisect_state` & `bisect_head` shell function in CPranit Bauva, Oct 14, 2016
  40. Stephan BeyerNov 22, 2016
  41. Pranit BauvaDec 6, 2016
  42. Stephan BeyerDec 6, 2016
  43. Pranit BauvaDec 8, 2016
  44. 14/27 t6030: no cleanup with bad merge basePranit Bauva, Oct 14, 2016
  45. Junio C HamanoOct 14, 2016
  46. Pranit BauvaOct 15, 2016
  47. 15/27 bisect--helper: `bisect_next` and `bisect_auto_next` shell function in CPranit Bauva, Oct 14, 2016
  48. Stephan BeyerNov 20, 2016
  49. Pranit BauvaDec 31, 2016
  50. Stephan BeyerNov 21, 2016
  51. Pranit BauvaDec 31, 2016
  52. Stephan BeyerJan 1, 2017
  53. Pranit BauvaJan 1, 2017
  54. 07/27 bisect--helper: `bisect_reset` shell function in CPranit Bauva, Oct 14, 2016
  55. Stephan BeyerNov 16, 2016
  56. Pranit BauvaNov 17, 2016
  57. 17/27 bisect--helper: retire `--next-all` subcommandPranit Bauva, Oct 14, 2016
  58. 24/27 bisect--helper: retire `--bisect-write` subcommandPranit Bauva, Oct 14, 2016
  59. 03/27 bisect--helper: `write_terms` shell function in CPranit Bauva, Oct 14, 2016
  60. 02/27 bisect: rewrite `check_term_format` shell function in CPranit Bauva, Oct 14, 2016
  61. Stephan BeyerNov 14, 2016
  62. Pranit BauvaNov 15, 2016
  63. 26/27 bisect--helper: retire `--bisect-auto-next` subcommandPranit Bauva, Oct 14, 2016
  64. 16/27 bisect--helper: retire `--bisect-clean-state` subcommandPranit Bauva, Oct 14, 2016
  65. 08/27 bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in CPranit Bauva, Oct 14, 2016
  66. Stephan BeyerNov 16, 2016
  67. Pranit BauvaDec 6, 2016
  68. Pranit BauvaDec 16, 2016
  69. Stephan BeyerDec 17, 2016
  70. Pranit BauvaDec 16, 2016
  71. Stephan BeyerDec 17, 2016
  72. 25/27 bisect--helper: retire `--bisect-autostart` subcommandPranit Bauva, Oct 14, 2016
  73. Pranit BauvaOct 14, 2016
  74. 11/27 bisect--helper: `bisect_next_check` & bisect_voc shell function in CPranit Bauva, Oct 14, 2016
  75. Stephan BeyerNov 17, 2016
  76. Pranit BauvaDec 6, 2016
  77. 27/27 bisect--helper: remove the dequote in bisect_start()Pranit Bauva, Oct 14, 2016
  78. Junio C HamanoOct 27, 2016
  79. Christian CouderOct 27, 2016
  80. Matthieu MoyOct 28, 2016
  81. Stephan BeyerNov 15, 2016
  82. Junio C HamanoNov 16, 2016

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.