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

[PATCH] diff.c: die on unknown color-moved ws mode

From
Stefan Beller <sbeller@google.com>
Date
Oct 11, 2018, 22:59 UTC
Message-ID
<20181011225928.76051-1-sbeller@google.com>
In-Reply-To
<xmqqa7nkf6o4.fsf@gitster-ct.c.googlers.com>
Noticed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
--- 
   There is no "ignore-any" supported by the feature---I think that
   the parser for the option should have noticed and barfed, but it
   did not.  It merely emitted a message to the standard output and
   let it scroll away with the huge diff before the reader noticed
   it.
   
Addressed in this patch.
   Am I missing something [...] ?

Note that this parsing is used for both the parsing from command line as well as options, i.e.

  git config diff.colorMovedWS asdf
  git format-patch HEAD^
fatal: ignoring unknown color-moved-ws mode 'asdf'
  git config --unset diff.colorMovedWS
(format-patch parses these color specific things, but doesn't apply it)
   
 diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diff.c b/diff.c
index 145cfbae59..bdf4535d69 100644
--- a/diff.c
+++ b/diff.c
@@ -313,7 +313,7 @@ static int parse_color_moved_ws(const char *arg)
 		else if (!strcmp(sb.buf, "allow-indentation-change"))
 			ret |= COLOR_MOVED_WS_ALLOW_INDENTATION_CHANGE;
 		else
-			error(_("ignoring unknown color-moved-ws mode '%s'"), sb.buf);
+			die(_("ignoring unknown color-moved-ws mode '%s'"), sb.buf);
 
 		strbuf_release(&sb);
 	}
-- 
2.19.0
Previous: Junio C HamanoNext: Stefan Beller
Message 12 of 34 in “What's cooking in git.git (Oct 2018, #01; Wed, 10)”
  1. Junio C HamanoOct 10, 2018
  2. Ævar Arnfjörð BjarmasonOct 10, 2018
  3. Jeff KingOct 10, 2018
  4. builtin stash/rebase, was Re: What's cooking in git.git (Oct 2018, #01; Wed, 10)Johannes Schindelin, Oct 10, 2018
  5. Junio C HamanoOct 10, 2018
  6. Junio C HamanoOct 11, 2018
  7. js/mingw-wants-vista-or-above, was Re: What's cooking in git.git (Oct 2018, #01; Wed, 10)Johannes Schindelin, Oct 10, 2018
  8. Junio C HamanoOct 10, 2018
  9. Phillip WoodOct 10, 2018
  10. Junio C HamanoOct 11, 2018
  11. Junio C HamanoOct 11, 2018
  12. diff.c: die on unknown color-moved ws modeStefan Beller, Oct 11, 2018
  13. Stefan BellerOct 11, 2018
  14. Junio C HamanoOct 12, 2018
  15. Stefan BellerOct 11, 2018
  16. Junio C HamanoOct 12, 2018
  17. Phillip WoodOct 12, 2018
  18. Junio C HamanoOct 12, 2018
  19. Phillip WoodOct 16, 2018
  20. Stefan BellerOct 16, 2018
  21. Thomas GummererOct 10, 2018
  22. Junio C HamanoOct 11, 2018
  23. `--rebase-merges' still failing badlyMichael Witten, Oct 10, 2018
  24. Michael WittenOct 10, 2018
  25. Junio C HamanoOct 10, 2018
  26. Michael WittenOct 11, 2018
  27. Johannes SchindelinOct 12, 2018
  28. Stefan BellerOct 10, 2018
  29. Junio C HamanoOct 11, 2018
  30. Tim SchumacherOct 10, 2018
  31. Johannes SixtOct 10, 2018
  32. Junio C HamanoOct 11, 2018
  33. Derrick StoleeOct 11, 2018
  34. Duy NguyenOct 14, 2018

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.