diff-parseopt: convert -l
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Mar 24, 2019 at 15:19 UTC
bffee749a8d749913bae24e8b6ae17c8cf846770
1 file changed
+2
-4
diff.c
+2
-4
@@ -5283,6 +5283,8 @@ static void prep_parse_options(struct diff_options *options)
5283
OPT_CALLBACK_F(0, "follow", options, NULL,
5284
N_("continue listing the history of a file beyond renames"),
5285
PARSE_OPT_NOARG, diff_opt_follow),
5286
+ OPT_INTEGER('l', NULL, &options->rename_limit,
5287
+ N_("prevent rename/copy detection if the number of rename/copy targets exceeds given limit")),
5288
5289
OPT_GROUP(N_("Diff algorithm options")),
5290
OPT_BIT(0, "minimal", &options->xdl_opts,
@@ -5413,10 +5415,6 @@ int diff_opt_parse(struct diff_options *options,
5415
}
5416
5417
/* misc options */
5416
- else if ((argcount = short_opt('l', av, &optarg))) {
5417
- options->rename_limit = strtoul(optarg, NULL, 10);
5418
- return argcount;
5419
- }
5418
else if ((argcount = short_opt('S', av, &optarg))) {
5419
options->pickaxe = optarg;
5420
options->pickaxe_opts |= DIFF_PICKAXE_KIND_S;