All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, phillip.wood@talktalk.net, sbeller@google.com
Subject: [PATCH] diff.c: die on unknown color-moved ws mode
Date: Thu, 11 Oct 2018 15:59:28 -0700	[thread overview]
Message-ID: <20181011225928.76051-1-sbeller@google.com> (raw)
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


  reply	other threads:[~2018-10-11 22:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10  5:43 What's cooking in git.git (Oct 2018, #01; Wed, 10) Junio C Hamano
2018-10-10  7:59 ` Ævar Arnfjörð Bjarmason
2018-10-10 15:06   ` Jeff King
2018-10-10 12:57 ` builtin stash/rebase, was " Johannes Schindelin
2018-10-10 13:19   ` Junio C Hamano
2018-10-11  2:18   ` Junio C Hamano
2018-10-10 13:04 ` js/mingw-wants-vista-or-above, " Johannes Schindelin
2018-10-10 13:13   ` Junio C Hamano
2018-10-10 13:58 ` Phillip Wood
2018-10-11  1:54   ` Junio C Hamano
2018-10-11 22:40   ` Junio C Hamano
2018-10-11 22:59     ` Stefan Beller [this message]
2018-10-11 23:01       ` [PATCH] diff.c: die on unknown color-moved ws mode Stefan Beller
2018-10-12  1:22       ` Junio C Hamano
2018-10-11 23:06     ` What's cooking in git.git (Oct 2018, #01; Wed, 10) Stefan Beller
2018-10-12  0:51       ` Junio C Hamano
2018-10-12  9:59     ` Phillip Wood
2018-10-12 13:36       ` Junio C Hamano
2018-10-16 13:38         ` Phillip Wood
2018-10-16 17:13           ` Stefan Beller
2018-10-10 14:18 ` Thomas Gummerer
2018-10-11  1:40   ` Junio C Hamano
2018-10-10 18:51 ` `--rebase-merges' still failing badly Michael Witten
2018-10-10 19:00   ` Michael Witten
2018-10-10 23:01   ` Junio C Hamano
2018-10-11  2:44     ` Michael Witten
2018-10-12  9:11   ` Johannes Schindelin
2018-10-10 18:55 ` What's cooking in git.git (Oct 2018, #01; Wed, 10) Stefan Beller
2018-10-11  2:00   ` Junio C Hamano
2018-10-10 20:38 ` Tim Schumacher
2018-10-10 21:25 ` Johannes Sixt
2018-10-11  1:53   ` Junio C Hamano
2018-10-11 11:16 ` Derrick Stolee
2018-10-14 12:21 ` Duy Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181011225928.76051-1-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood@talktalk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.