From patchwork Thu Feb 7 10:33:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10800773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEF8F6C2 for ; Thu, 7 Feb 2019 10:35:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD1F92A513 for ; Thu, 7 Feb 2019 10:35:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A06602BB2C; Thu, 7 Feb 2019 10:35:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24C432A513 for ; Thu, 7 Feb 2019 10:35:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726966AbfBGKfK (ORCPT ); Thu, 7 Feb 2019 05:35:10 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:45339 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726727AbfBGKfJ (ORCPT ); Thu, 7 Feb 2019 05:35:09 -0500 Received: by mail-pl1-f195.google.com with SMTP id a14so4577937plm.12 for ; Thu, 07 Feb 2019 02:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H1VmexvKxBbBWVk5htuHDqVzeD2tHkBYJj/3Y/hfdgY=; b=rb8Y75m7Jj9VYB3hq6uLLnZrvW8EtMXIY5uq0ufy4roMwmbNDLn+8brdwKYnzcvqba Hn/ZSvqeZHpZyiKd1Ht+4mMAhFWP0CLJq1wPj4Dd42QDi+gMI50tK8QoJchKi7LcrBEb andeXYtvNA6QzWzWZ4xdJnHxzoSBluPgI+2VoLQn50358MOuP4LvOTSlAbpmB01UmSwt 553HgrfuUphjOXaeKXn24r3HhaFJcsVlNblLfjY+F2Xbu0/OsMuq1V4zo+yj3Wka7Wsa UI9pIB41t3Mk4LLoxX5PS6H+fryP6TOrZfRntQqDdTp/SaY1EqLH26Qd/hZxUCZswHNK 2TlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H1VmexvKxBbBWVk5htuHDqVzeD2tHkBYJj/3Y/hfdgY=; b=oTUJk78pn41BagI3COWFd3MBqS8WeiwvS79CPPNZHWC5ZaRncRQTXrJjHdQ9Et5b2M KJeVFH/3F90QydJwUIuhZi21mK84Z0L+xGCo4vg84La4u/64y+IcEnUfYZQQxSNircuA WCeq4GIocc7eYkq5AeedL7h+0095QvjOoS5hYwFvtwkD1r+SAj8Z7bEI8DYwhe3xf5h/ 6kTbqNPBl7s34hx1CuPa51g14of8Ygb4hwJ8PFvGTyIZ0Ydj3opwYnSW0Pkmo1nDaD4h aXKzeqBUaesldQqdK1rPaW4QotvXfHmKDsJfN0Ckjl08DfmR6jsFWtSYqQyuwfvjLdKK mrlQ== X-Gm-Message-State: AHQUAuYW1dSNnJ/ylazM9ZFbDN4GN/I6wZObR/WSZ2VUq4EGZDbTx+XW vL/9kdVBkjnccPbkpZRr7Be+7MfV X-Google-Smtp-Source: AHgI3IYiOLsEC4YlO2NleSOk8fhyqrRAewpIN1THCokmYLMRxzvcY59dQs9FpKvg7371+MhIurwwdA== X-Received: by 2002:a17:902:bd0b:: with SMTP id p11mr15776931pls.259.1549535709054; Thu, 07 Feb 2019 02:35:09 -0800 (PST) Received: from ash ([115.72.21.220]) by smtp.gmail.com with ESMTPSA id g20sm7111426pfg.85.2019.02.07.02.35.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 02:35:08 -0800 (PST) Received: by ash (sSMTP sendmail emulation); Thu, 07 Feb 2019 17:35:04 +0700 From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmc=?= =?utf-8?b?4buNYyBEdXk=?= Subject: [PATCH 17/21] diff.c: convert --find-copies-harder Date: Thu, 7 Feb 2019 17:33:22 +0700 Message-Id: <20190207103326.10693-18-pclouds@gmail.com> X-Mailer: git-send-email 2.20.1.682.gd5861c6d90 In-Reply-To: <20190207103326.10693-1-pclouds@gmail.com> References: <20190207103326.10693-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --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 --- diff.c | 4 ++-- 1 file 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_(""), @@ -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")) {