From patchwork Fri Jul 30 08:32:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Li Linchao X-Patchwork-Id: 12410635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB4E3C4338F for ; Fri, 30 Jul 2021 08:32:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2A4E60F6B for ; Fri, 30 Jul 2021 08:32:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237922AbhG3Icq (ORCPT ); Fri, 30 Jul 2021 04:32:46 -0400 Received: from smtp31.hk.chengmail.me ([113.10.190.196]:45502 "EHLO smtp31.hk.chengmail.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbhG3Icp (ORCPT ); Fri, 30 Jul 2021 04:32:45 -0400 X-CHENGMAILHOST: 113.10.190.196 X-CHENGMAIL-INSTANCEID: 634c.6103b915.508ba.0 Date: Fri, 30 Jul 2021 16:32:21 +0800 From: "lilinchao@oschina.cn" To: git Cc: "Junio C Hamano" Subject: Should "git apply"'s option "--3way" imply "--index" in option description? X-Priority: 3 X-GUID: F88B2002-5B73-4A7B-9C69-9DCCC19CEEC8 X-Has-Attach: no X-Mailer: Foxmail 7.2.19.158[cn] Mime-Version: 1.0 X-source-message-id: <202107301631209389909@oschina.cn> Message-ID: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org like this: diff --git a/apply.c b/apply.c index 44bc31d6eb..0b353af96c 100644 --- a/apply.c +++ b/apply.c @@ -5024,7 +5024,7 @@ int apply_parse_options(int argc, const char **argv,                 OPT_BOOL(0, "apply", force_apply,                         N_("also apply the patch (use with --stat/--summary/--check)")),                 OPT_BOOL('3', "3way", &state->threeway, -                        N_( "attempt three-way merge, fall back on normal patch if that fails")), +                        N_( "attempt three-way merge, fall back on normal patch if that fails(implies --index)")),                 OPT_FILENAME(0, "build-fake-ancestor", &state->fake_ancestor,                         N_("build a temporary index based on embedded index information")),                 /* Think twice before adding "--nul" synonym to this */