Thread (88 messages) 88 messages, 5 authors, 2019-01-21
STALE2709d

[PATCH 59/76] diff.c: convert -z

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2019-01-17 13:11:25
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 diff.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 0922937bab..e4495194d3 100644
--- a/diff.c
+++ b/diff.c
@@ -5242,6 +5242,9 @@ static void prep_parse_options(struct diff_options *options)
 		OPT_CALLBACK_F(0, "ws-error-highlight", options, N_("<kind>"),
 			       N_("highlight whitespaces 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>"),
@@ -5414,8 +5417,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;
-- 
2.20.0.482.g66447595a7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help