Skip to content

Commit ed88148

Browse files
pcloudsgitster
authored andcommitted
diff.c: convert --raw
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7fd9a1b commit ed88148

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

diff.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4898,6 +4898,9 @@ static void prep_parse_options(struct diff_options *options)
48984898
PARSE_OPT_NONEG, diff_opt_unified),
48994899
OPT_BOOL('W', "function-context", &options->flags.funccontext,
49004900
N_("generate diffs with <n> lines context")),
4901+
OPT_BIT_F(0, "raw", &options->output_format,
4902+
N_("generate the diff in raw format"),
4903+
DIFF_FORMAT_RAW, PARSE_OPT_NONEG),
49014904
OPT_END()
49024905
};
49034906

@@ -4926,9 +4929,7 @@ int diff_opt_parse(struct diff_options *options,
49264929
return ac;
49274930

49284931
/* Output format options */
4929-
if (!strcmp(arg, "--raw"))
4930-
options->output_format |= DIFF_FORMAT_RAW;
4931-
else if (!strcmp(arg, "--patch-with-raw")) {
4932+
if (!strcmp(arg, "--patch-with-raw")) {
49324933
enable_patch_output(&options->output_format);
49334934
options->output_format |= DIFF_FORMAT_RAW;
49344935
} else if (!strcmp(arg, "--numstat"))

0 commit comments

Comments
 (0)