summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-24 08:19:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-24 13:21:22 (GMT)
commit1a1eb164cfec50ab9869cd3e61f2415ae9e2f599 (patch)
treec602f0477d4102cbac3e27d750e10374fc5adbe1 /diff.c
parent96860e48d3b7da2f20f4b7e8668246335d0527b9 (diff)
downloadgit-1a1eb164cfec50ab9869cd3e61f2415ae9e2f599.zip
git-1a1eb164cfec50ab9869cd3e61f2415ae9e2f599.tar.gz
git-1a1eb164cfec50ab9869cd3e61f2415ae9e2f599.tar.bz2
diff-parseopt: convert -z
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 8255db6..2b1d015 100644
--- a/diff.c
+++ b/diff.c
@@ -5238,6 +5238,9 @@ static void prep_parse_options(struct diff_options *options)
OPT_CALLBACK_F(0, "ws-error-highlight", options, N_("<kind>"),
N_("highlight whitespace errors in the 'context', 'old' or 'new' lines in the diff"),
PARSE_OPT_NONEG, diff_opt_ws_error_highlight),
+ OPT_SET_INT('z', NULL, &options->line_termination,
+ N_("do not munge pathnames and use NULs as output field terminators in --raw or --numstat"),
+ 0),
OPT_CALLBACK_F(0, "output-indicator-new",
&options->output_indicators[OUTPUT_INDICATOR_NEW],
N_("<char>"),
@@ -5410,8 +5413,6 @@ int diff_opt_parse(struct diff_options *options,
}
/* misc options */
- else if (!strcmp(arg, "-z"))
- options->line_termination = 0;
else if ((argcount = short_opt('l', av, &optarg))) {
options->rename_limit = strtoul(optarg, NULL, 10);
return argcount;