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

[PATCH] revert: clarify seemingly bogus OPT_END repetition

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 5, 2016, 11:58 UTC
Message-ID
<5b424bad41ca027b39eea4b1fa9d87df0a489e0f.1467719888.git.johannes.schindelin@gmx.de>

This developer stumbled over repeated OPT_END entries and was *so close* (almost touches his thumb with his index finger) to collapse them into a single one. Only inspecting the file's history with `git log -p -SOPT_END` clarified why they are there.

This confusion can be easily prevented by inserting a simple and clear comment.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	Another patch from the rebase--helper queue.
Published-As: https://github.com/dscho/git/releases/tag/clarify-opt-end-v1
 builtin/revert.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/builtin/revert.c b/builtin/revert.c
index 56a2c36..b4da1f6 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -92,6 +92,7 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)
 		{ OPTION_STRING, 'S', "gpg-sign", &opts->gpg_sign, N_("key-id"),
 		  N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
 		OPT_END(),
+		/* place-holders for REPLAY_PICK's extra options, see below */
 		OPT_END(),
 		OPT_END(),
 		OPT_END(),
-- 
2.9.0.280.g32e2a70

base-commit: cf4c2cfe52be5bd973a4838f73a35d3959ce2f43
Next: Jeff King
Message 1 of 13 in “revert: clarify seemingly bogus OPT_END repetition”
  1. revert: clarify seemingly bogus OPT_END repetitionJohannes Schindelin, Jul 5, 2016
  2. Jeff KingJul 5, 2016
  3. Jeff KingJul 5, 2016
  4. Jacob KellerJul 5, 2016
  5. Johannes SchindelinJul 6, 2016
  6. Michael J GruberJul 6, 2016
  7. Over-/underquoting, was Re: [PATCH] revert: clarify seemingly bogus OPT_END repetitionJohannes Schindelin, Jul 6, 2016
  8. Jacob KellerJul 6, 2016
  9. Michael J GruberJul 9, 2016
  10. Eric WongJul 9, 2016
  11. Johannes SchindelinJul 6, 2016
  12. Johannes SchindelinJul 6, 2016
  13. Jeff KingJul 6, 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.