Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-24 11:19:58 +0300
committerJunio C Hamano <gitster@pobox.com>2019-03-24 16:21:22 +0300
commitbffee749a8d749913bae24e8b6ae17c8cf846770 (patch)
tree92573a76f3be30346d3a01ae9f64ffd0f24bd007 /diff.c
parent1a1eb164cfec50ab9869cd3e61f2415ae9e2f599 (diff)
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/diff.c b/diff.c
index 2b1d015553..6b19c97499 100644
--- a/diff.c
+++ b/diff.c
@@ -5283,6 +5283,8 @@ static void prep_parse_options(struct diff_options *options)
OPT_CALLBACK_F(0, "follow", options, NULL,
N_("continue listing the history of a file beyond renames"),
PARSE_OPT_NOARG, diff_opt_follow),
+ OPT_INTEGER('l', NULL, &options->rename_limit,
+ N_("prevent rename/copy detection if the number of rename/copy targets exceeds given limit")),
OPT_GROUP(N_("Diff algorithm options")),
OPT_BIT(0, "minimal", &options->xdl_opts,
@@ -5413,10 +5415,6 @@ int diff_opt_parse(struct diff_options *options,
}
/* misc options */
- else if ((argcount = short_opt('l', av, &optarg))) {
- options->rename_limit = strtoul(optarg, NULL, 10);
- return argcount;
- }
else if ((argcount = short_opt('S', av, &optarg))) {
options->pickaxe = optarg;
options->pickaxe_opts |= DIFF_PICKAXE_KIND_S;