{"thread":{"id":"56181","subject":"Should \"git apply\"'s option \"--3way\" imply \"--index\" in option description?","startedAt":"2021-07-30T08:32:42Z","lastAt":"2021-07-30T14:34:18Z","messageCount":2,"participants":["lilinchao@oschina.cn","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"431543","messageId":"a9c2851af11011ebb8e40024e87935e7@oschina.cn","threadId":"56181","inReplyTo":null,"subject":"Should \"git apply\"'s option \"--3way\" imply \"--index\" in option description?","fromName":"lilinchao@oschina.cn","fromEmail":"lilinchao@oschina.cn","sentAt":"2021-07-30T08:32:21Z","receivedAt":"2021-07-30T08:32:42Z","isPatch":false,"sender":{"key":"lilinchao@oschina.cn","avatar":null},"body":"like this:\n\ndiff --git a/apply.c b/apply.c\nindex 44bc31d6eb..0b353af96c 100644\n--- a/apply.c\n+++ b/apply.c\n@@ -5024,7 +5024,7 @@ int apply_parse_options(int argc, const char **argv,\n                OPT_BOOL(0, \"apply\", force_apply,\n                        N_(\"also apply the patch (use with --stat/--summary/--check)\")),\n                OPT_BOOL('3', \"3way\", &state->threeway,\n-                        N_( \"attempt three-way merge, fall back on normal patch if that fails\")),\n+                        N_( \"attempt three-way merge, fall back on normal patch if that fails(implies --index)\")),\n                OPT_FILENAME(0, \"build-fake-ancestor\", &state->fake_ancestor,\n                        N_(\"build a temporary index based on embedded index information\")),\n                /* Think twice before adding \"--nul\" synonym to this */\n"},{"id":"431576","messageId":"xmqqeebf3m74.fsf@gitster.g","threadId":"56181","inReplyTo":"a9c2851af11011ebb8e40024e87935e7@oschina.cn","subject":"Re: Should \"git apply\"'s option \"--3way\" imply \"--index\" in option description?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-07-30T14:34:07Z","receivedAt":"2021-07-30T14:34:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"lilinchao@oschina.cn\" <lilinchao@oschina.cn> writes:\n\n> like this:\n>\n> diff --git a/apply.c b/apply.c\n> index 44bc31d6eb..0b353af96c 100644\n> --- a/apply.c\n> +++ b/apply.c\n> @@ -5024,7 +5024,7 @@ int apply_parse_options(int argc, const char **argv,\n>                 OPT_BOOL(0, \"apply\", force_apply,\n>                         N_(\"also apply the patch (use with --stat/--summary/--check)\")),\n>                 OPT_BOOL('3', \"3way\", &state->threeway,\n> -                        N_( \"attempt three-way merge, fall back on normal patch if that fails\")),\n> +                        N_( \"attempt three-way merge, fall back on normal patch if that fails(implies --index)\")),\n>                 OPT_FILENAME(0, \"build-fake-ancestor\", &state->fake_ancestor,\n>                         N_(\"build a temporary index based on embedded index information\")),\n>                 /* Think twice before adding \"--nul\" synonym to this */\n\nIt is not incorrect per-se, but because \"--3way\" implies \"--index\"\nonly when \"--cached\" is not in effect, it may do more harm than it\nhelps to mention only just the \"--index\" half of the story.\n\nIf we were to touch that line, I'd just chop off \"if that fails\" at\nthe end---the phrase \"fall back\" already tells readers that it happens\nonly when the non-fallback action does not work.\n\nThanks.\n"}]}