{"thread":{"id":"52137","subject":"[PATCH] builtin/blame.c: remove '--indent-heuristic' from usage string","startedAt":"2019-10-28T10:52:50Z","lastAt":"2019-10-29T03:29:36Z","messageCount":2,"participants":["SZEDER Gábor","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"384973","messageId":"20191028105242.19260-1-szeder.dev@gmail.com","threadId":"52137","inReplyTo":null,"subject":"[PATCH] builtin/blame.c: remove '--indent-heuristic' from usage string","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-10-28T10:52:41Z","receivedAt":"2019-10-28T10:52:50Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"The indent heuristic is our default diff heuristic since 33de716387\n(diff: enable indent heuristic by default, 2017-05-08), but the usage\nstring of 'git blame' still mentions it as \"experimental heuristic\".\n\nWe could simply update the short help associated with the option, but\naccording to the comment above the option's declaration it was \"only\nincluded here to get included in the \"-h\" output\".  That made sense\nwhile the feature was still experimental and we wanted to give it more\nexposure, but nowadays it's unnecessary.\n\nSo let's rather remove the '--indent-heuristic' option from 'git\nblame's usage string.  Note that 'git blame' will still accept this\noption, as it is parsed in parse_revision_opt().\n\nAstute readers may notice that this patch removes a comment mentioning\n\"the following two options\", but it only removes one option.  The\nreason is that the comment is outdated: that other options was\n'--compaction-heuristic', and it has already been removed in\n3cde4e02ee (diff: retire \"compaction\" heuristics, 2016-12-23), but\nthat commit forgot to update this comment.\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n---\n\nLooking at the places listed by 'git grep \"indent[ -]\\?heuristic\",\nthis might be the last place where the indent heuristic was marked as\nexperimental.\n\nIn 'diff.c' we have the following option declaration:\n\n  OPT_BIT(0, \"indent-heuristic\", &options->xdl_opts,\n          N_(\"heuristic to shift diff hunk boundaries for easy reading\"),\n\nHere we could perhaps mention that it's the default; OTOH this help is\nnever shown anywhere (there are just too many diff options to list).\n\n builtin/blame.c | 8 --------\n 1 file changed, 8 deletions(-)\n\ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex 6386fbf189..b184cde4b7 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -861,14 +861,6 @@ int cmd_blame(int argc, const char **argv, const char *prefix)\n \t\tOPT_STRING_LIST(0, \"ignore-revs-file\", &ignore_revs_file_list, N_(\"file\"), N_(\"Ignore revisions from <file>\")),\n \t\tOPT_BIT(0, \"color-lines\", &output_option, N_(\"color redundant metadata from previous line differently\"), OUTPUT_COLOR_LINE),\n \t\tOPT_BIT(0, \"color-by-age\", &output_option, N_(\"color lines by age\"), OUTPUT_SHOW_AGE_WITH_COLOR),\n-\n-\t\t/*\n-\t\t * The following two options are parsed by parse_revision_opt()\n-\t\t * and are only included here to get included in the \"-h\"\n-\t\t * output:\n-\t\t */\n-\t\t{ OPTION_LOWLEVEL_CALLBACK, 0, \"indent-heuristic\", NULL, NULL, N_(\"Use an experimental heuristic to improve diffs\"), PARSE_OPT_NOARG, NULL, 0, parse_opt_unknown_cb },\n-\n \t\tOPT_BIT(0, \"minimal\", &xdl_opts, N_(\"Spend extra cycles to find better match\"), XDF_NEED_MINIMAL),\n \t\tOPT_STRING('S', NULL, &revs_file, N_(\"file\"), N_(\"Use revisions from <file> instead of calling git-rev-list\")),\n \t\tOPT_STRING(0, \"contents\", &contents_from, N_(\"file\"), N_(\"Use <file>'s contents as the final image\")),\n-- \n2.24.0.rc1.538.gfb6e1f15ab\n\n"},{"id":"385044","messageId":"xmqq36fc6xgk.fsf@gitster-ct.c.googlers.com","threadId":"52137","inReplyTo":"20191028105242.19260-1-szeder.dev@gmail.com","subject":"Re: [PATCH] builtin/blame.c: remove '--indent-heuristic' from usage string","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-10-29T03:29:31Z","receivedAt":"2019-10-29T03:29:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n> Astute readers may notice that this patch removes a comment mentioning\n> \"the following two options\", but it only removes one option.  The\n> reason is that the comment is outdated: that other options was\n> '--compaction-heuristic', and it has already been removed in\n> 3cde4e02ee (diff: retire \"compaction\" heuristics, 2016-12-23), but\n> that commit forgot to update this comment.\n\nThanks.\n"}]}