apply: mark include/exclude options as NONEG
commitd5d202537f2cfec41304b559624b4cc0a2d8c9fe
authorJeff King <peff@peff.net>
Mon, 5 Nov 2018 06:38:19 +0000 (5 01:38 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 03:55:35 +0000 (6 12:55 +0900)
tree2572174be4ac08e3fc43e436e30b291df8fc7689
parentcd69ec8cde54af1817630331fc441f493866f0d4
apply: mark include/exclude options as NONEG

The options callback for "git apply --no-include" is not ready to handle
the "unset" parameter, and as a result will segfault when it adds a NULL
argument to the include list (likewise for "--no-exclude").

In theory this might be used to clear the list, but since both
"--include" and "--exclude" add to the same list, it's not immediately
obvious what the semantics should be. Let's punt on that for now and
just disallow the broken options.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c