Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diff-parseopt: convert -z
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 24 Mar 2019 08:19:57 +0000
(15:19 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 24 Mar 2019 13:21:22 +0000
(22:21 +0900)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
96860e4
)
diff --git
a/diff.c
b/diff.c
index 8255db69667777667efb69f6896294253e53f0b2..2b1d01555300c87deeaa684139254a1120ee9d35 100644
(file)
--- 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_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>"),
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 */
}
/* 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;
else if ((argcount = short_opt('l', av, &optarg))) {
options->rename_limit = strtoul(optarg, NULL, 10);
return argcount;