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-02-21 14:16:17 +0300
committerJunio C Hamano <gitster@pobox.com>2019-02-22 02:16:59 +0300
commitbdd4741bfd380ca70fe3d185e7bd7f8ff54eafc1 (patch)
tree74cbc45f90f823e70103b0a4b4a5bb5098cc27ca /diff.c
parent7f64850d364b471f27f3123c4334397f9e03b09c (diff)
diff-parseopt: convert --find-copies-harder
--no-find-copies-harder is also added on purpose (because I don't see why we should not have the --no- version for this) 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 35bac115cc..abb1566f95 100644
--- a/diff.c
+++ b/diff.c
@@ -5085,6 +5085,8 @@ static void prep_parse_options(struct diff_options *options)
N_("detect copies"),
PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
diff_opt_find_copies),
+ OPT_BOOL(0, "find-copies-harder", &options->flags.find_copies_harder,
+ N_("use unmodified files as source to find copies")),
OPT_GROUP(N_("Diff other options")),
{ OPTION_CALLBACK, 0, "output", options, N_("<file>"),
@@ -5191,8 +5193,6 @@ int diff_opt_parse(struct diff_options *options,
options->flags.text = 1;
else if (!strcmp(arg, "-R"))
options->flags.reverse_diff = 1;
- else if (!strcmp(arg, "--find-copies-harder"))
- options->flags.find_copies_harder = 1;
else if (!strcmp(arg, "--follow"))
options->flags.follow_renames = 1;
else if (!strcmp(arg, "--no-follow")) {