{"thread":{"id":"63381","subject":"[PATCH 0/2] Nominating \"whatchanged\" for removal","startedAt":"2025-05-01T21:34:54Z","lastAt":"2025-05-14T13:38:58Z","messageCount":39,"participants":["Junio C Hamano","Patrick Steinhardt","Elijah Newren"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"517065","messageId":"20250501213452.370729-1-gitster@pobox.com","threadId":"63381","inReplyTo":null,"subject":"[PATCH 0/2] Nominating \"whatchanged\" for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-01T21:34:50Z","receivedAt":"2025-05-01T21:34:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This does not go far enough to touch the \"Git 3.0 removal\" list in\nDocumentation/BreakingChanges.adoc, but is a preparatory step\nnecessary if we ever wanted to do so in the future.\n\nThe first step is to split out the long \"we marked this for removal.\ntell us at git@vger.kernel.org if you still use it, and in the\nmeantime we refuse to proceed without --i-still-use-this\" message\nout of \"git pack-redundant\" implementation and makes it reusable.\n\nThe second step is to use that helper to mark \"git whatchanged\" for\nremoval.\n\nJunio C Hamano (2):\n  you-still-use-that??: help deprecating commands for removal\n  whatchanged: require --i-still-use-this\n\n Documentation/git-whatchanged.adoc | 10 ++++++++--\n builtin/log.c                      | 13 +++++++++++++\n builtin/pack-redundant.c           | 10 ++--------\n git-compat-util.h                  |  2 ++\n t/t4013-diff-various.sh            | 17 +++++++++++++++--\n t/t5323-pack-redundant.sh          |  5 +++++\n usage.c                            | 12 ++++++++++++\n 7 files changed, 57 insertions(+), 12 deletions(-)\n\n-- \n2.49.0-599-g90c2cffacf\n\n"},{"id":"517066","messageId":"20250501213452.370729-2-gitster@pobox.com","threadId":"63381","inReplyTo":"20250501213452.370729-1-gitster@pobox.com","subject":"[PATCH 1/2] you-still-use-that??: help deprecating commands for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-01T21:34:51Z","receivedAt":"2025-05-01T21:34:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"A command slated for removal like \"git pack-redundant\" gains a\ncommand line option \"--i-still-use-this\", and refuses to work when\nthe option is not given.  The message and the instruction upon\nseeing what to do are both rather long, so before letting another\ncommand to use the same mechanism, factor out the message+die part\ninto a small helper function, and use that.\n\nThe existing pack-redundant test lacked a test to make sure that we\nrequire the --i-still-use-this option.  Add one while we are at it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/pack-redundant.c  | 10 ++--------\n git-compat-util.h         |  2 ++\n t/t5323-pack-redundant.sh |  5 +++++\n usage.c                   | 12 ++++++++++++\n 4 files changed, 21 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c\nindex 3febe732f8..6dc9e020c7 100644\n--- a/builtin/pack-redundant.c\n+++ b/builtin/pack-redundant.c\n@@ -625,14 +625,8 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s\n \t\t\tbreak;\n \t}\n \n-\tif (!i_still_use_this) {\n-\t\tfputs(_(\"'git pack-redundant' is nominated for removal.\\n\"\n-\t\t\t\"If you still use this command, please add an extra\\n\"\n-\t\t\t\"option, '--i-still-use-this', on the command line\\n\"\n-\t\t\t\"and let us know you still use it by sending an e-mail\\n\"\n-\t\t\t\"to <git@vger.kernel.org>.  Thanks.\\n\"), stderr);\n-\t\tdie(_(\"refusing to run without --i-still-use-this\"));\n-\t}\n+\tif (!i_still_use_this)\n+\t\tyou_still_use_that(\"git pack-redundant\");\n \n \tif (load_all_packs)\n \t\tload_all();\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex e123288e8f..21cab99567 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -703,6 +703,8 @@ void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));\n \n void show_usage_if_asked(int ac, const char **av, const char *err);\n \n+NORETURN void you_still_use_that(const char *command_name);\n+\n #ifndef NO_OPENSSL\n #ifdef APPLE_COMMON_CRYPTO\n #include \"compat/apple-common-crypto.h\"\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 688cd9706c..f2f20cfa40 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -45,6 +45,11 @@ fi\n main_repo=main.git\n shared_repo=shared.git\n \n+test_expect_success 'pack-redundant needs --i-still-use-this' '\n+\ttest_must_fail git pack-redundant >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n git_pack_redundant='git pack-redundant --i-still-use-this'\n \n # Create commits in <repo> and assign each commit's oid to shell variables\ndiff --git a/usage.c b/usage.c\nindex 38b46bbbfe..4aaad2b553 100644\n--- a/usage.c\n+++ b/usage.c\n@@ -372,3 +372,15 @@ void bug_fl(const char *file, int line, const char *fmt, ...)\n \ttrace2_cmd_error_va(fmt, ap);\n \tva_end(ap);\n }\n+\n+NORETURN void you_still_use_that(const char *command_name)\n+{\n+\tfprintf(stderr,\n+\t\t_(\"'%s' is nominated for removal.\\n\"\n+\t\t  \"If you still use this command, please add an extra\\n\"\n+\t\t  \"option, '--i-still-use-this', on the command line\\n\"\n+\t\t  \"and let us know you still use it by sending an e-mail\\n\"\n+\t\t  \"to <git@vger.kernel.org>.  Thanks.\\n\"),\n+\t\tcommand_name);\n+\tdie(_(\"refusing to run without --i-still-use-this\"));\n+}\n-- \n2.49.0-599-g90c2cffacf\n\n"},{"id":"517067","messageId":"20250501213452.370729-3-gitster@pobox.com","threadId":"63381","inReplyTo":"20250501213452.370729-1-gitster@pobox.com","subject":"[PATCH 2/2] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-01T21:34:52Z","receivedAt":"2025-05-01T21:34:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The documentation of \"git whatchanged\" is pretty explicit that this\nhas retained for historical reasons to help those whose fingers\ncannot be retrained.  Let's see if they still are finding it hard to\ntype \"git log --raw\" instead of \"git whatchanged\" by marking the\ncommand as \"nominated for removal\", and require \"--i-still-use-this\"\non the command line.\n\nWhile at it, update the documentation page to use the new [synopsis]\nfacility to mark-up the SYNOPSIS part.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-whatchanged.adoc | 10 ++++++++--\n builtin/log.c                      | 13 +++++++++++++\n t/t4013-diff-various.sh            | 17 +++++++++++++++--\n 3 files changed, 36 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-whatchanged.adoc b/Documentation/git-whatchanged.adoc\nindex 8e55e0bb1e..d21484026f 100644\n--- a/Documentation/git-whatchanged.adoc\n+++ b/Documentation/git-whatchanged.adoc\n@@ -8,8 +8,14 @@ git-whatchanged - Show logs with differences each commit introduces\n \n SYNOPSIS\n --------\n-[verse]\n-'git whatchanged' <option>...\n+[synopsis]\n+git whatchanged <option>...\n+\n+WARNING\n+-------\n+`git whatchanged` has been deprecated and is scheduled for removal in\n+a future version of Git, as it is merely `git log` with different\n+default; `whatchanged` is not even shorter to type than `log --raw`.\n \n DESCRIPTION\n -----------\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 04a6ef97bc..0f98ac8a34 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -113,6 +113,13 @@ struct log_config {\n \tint fmt_patch_name_max;\n \tchar *fmt_pretty;\n \tchar *default_date_mode;\n+\n+\t/*\n+\t * Note: git_log_config() does not touch this member and that\n+\t * is very deliberate.  This member is only to be used to\n+\t * resurrect whatchanged that is deprecated.\n+\t */\n+\tint i_still_use_this;\n };\n \n static void log_config_init(struct log_config *cfg)\n@@ -267,6 +274,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tOPT__QUIET(&quiet, N_(\"suppress diff output\")),\n \t\tOPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n \t\tOPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"use mail map file\")),\n+\t\tOPT_HIDDEN_BOOL(0, \"i-still-use-this\", &cfg->i_still_use_this,\n+\t\t\t\t\"<use this deprecated command>\"),\n \t\tOPT_ALIAS(0, \"mailmap\", \"use-mailmap\"),\n \t\tOPT_CALLBACK_F(0, \"clear-decorations\", NULL, NULL,\n \t\t\t       N_(\"clear all previously-defined decoration filters\"),\n@@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,\n \topt.def = \"HEAD\";\n \topt.revarg_opt = REVARG_COMMITTISH;\n \tcmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);\n+\n+\tif (!cfg.i_still_use_this)\n+\t\tyou_still_use_that(\"git whatchanged\");\n+\n \tif (!rev.diffopt.output_format)\n \t\trev.diffopt.output_format = DIFF_FORMAT_RAW;\n \ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 3855d68dbc..8caab2ee38 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -203,11 +203,19 @@ do\n \ttest_expect_success \"git $cmd # magic is ${magic:-(not used)}\" '\n \t\t{\n \t\t\techo \"$ git $cmd\"\n+\n+\t\t\tcase \"$cmd\" in\n+\t\t\twhatchanged | whatchanged\" \"*)\n+\t\t\t\trun=\"whatchanged --i-still-use-this\"\n+\t\t\t\trun=\"$run ${cmd#whatchanged}\" ;;\n+\t\t\t*)\n+\t\t\t\trun=$cmd ;;\n+\t\t\tesac &&\n \t\t\tcase \"$magic\" in\n \t\t\t\"\")\n-\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;\n+\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $run ;;\n \t\t\tnoellipses)\n-\t\t\t\tgit $cmd ;;\n+\t\t\t\tgit $run ;;\n \t\t\tesac |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n \t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n@@ -454,6 +462,11 @@ diff-tree --stat --compact-summary initial mode\n diff-tree -R --stat --compact-summary initial mode\n EOF\n \n+test_expect_success 'whatchanged needs --i-still-use-this' '\n+\ttest_must_fail git whatchanged >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n test_expect_success 'log -m matches pure log' '\n \tgit log master >result &&\n \tprocess_diffs result >expected &&\n-- \n2.49.0-599-g90c2cffacf\n\n"},{"id":"517073","messageId":"xmqqikmkvukq.fsf@gitster.g","threadId":"63381","inReplyTo":"20250501213452.370729-3-gitster@pobox.com","subject":"Re: [PATCH 2/2] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-01T22:23:49Z","receivedAt":"2025-05-01T22:23:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> The documentation of \"git whatchanged\" is pretty explicit that this\n> has retained for historical reasons to help those whose fingers\n> cannot be retrained.  Let's see if they still are finding it hard to\n> type \"git log --raw\" instead of \"git whatchanged\" by marking the\n> command as \"nominated for removal\", and require \"--i-still-use-this\"\n> on the command line.\n>\n> While at it, update the documentation page to use the new [synopsis]\n> facility to mark-up the SYNOPSIS part.\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  Documentation/git-whatchanged.adoc | 10 ++++++++--\n>  builtin/log.c                      | 13 +++++++++++++\n>  t/t4013-diff-various.sh            | 17 +++++++++++++++--\n>  3 files changed, 36 insertions(+), 4 deletions(-)\n\nThis needs a bit more adjustments to the tests.  Namely\n\n - t4202-log needs to pass --i-still-use-this because the test wants\n   to check the output from the command when it functions;\n\n - t9300-fast-import needs to run \"log --raw\" instead, as the output\n   from the existing call to \"whatchanged\" is simply discarded and\n   not checked at all.  We could remove the call to \"whatchanged\"\n   whose output is not even tested.\n\nAlso as we haven't listed the removal of this command in the 3.0\nbreaking changes document, we do not support WITH_BREAKING_CHANGES\nbuild knob and test prerequisites yet.\n\n"},{"id":"517076","messageId":"20250501225958.2947677-1-gitster@pobox.com","threadId":"63381","inReplyTo":"20250501213452.370729-1-gitster@pobox.com","subject":"[PATCH v2 0/2] Nominating \"whatchanged\" for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-01T22:59:56Z","receivedAt":"2025-05-01T23:00:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This does not go far enough to touch the \"Git 3.0 removal\" list in\nDocumentation/BreakingChanges.adoc, but is a preparatory step\nnecessary if we ever wanted to do so in the future.\n\nThe first step is to split out the long \"we marked this for removal.\ntell us at git@vger.kernel.org if you still use it, and in the\nmeantime we refuse to proceed without --i-still-use-this\" message\nout of \"git pack-redundant\" implementation and makes it reusable.\n\nThe second step is to use that helper to mark \"git whatchanged\" for\nremoval.\n\nRelative to the previous iteration, the only change is necessary\nadjustment of tests that use \"git whatchanged\".  The ones that\nvalidate the output of \"whatchanged\" are updated to pass the\nnecessary \"--i-still-use-this\", and the ones that runs \"whatchanged\"\nwhile testing other commands are rewritten to use \"log --raw\".\n\nJunio C Hamano (2):\n  you-still-use-that??: help deprecating commands for removal\n  whatchanged: require --i-still-use-this\n\n Documentation/git-whatchanged.adoc | 10 ++++++++--\n builtin/log.c                      | 13 +++++++++++++\n builtin/pack-redundant.c           | 10 ++--------\n git-compat-util.h                  |  2 ++\n t/t4013-diff-various.sh            | 17 +++++++++++++++--\n t/t4202-log.sh                     | 14 +++++++++-----\n t/t5323-pack-redundant.sh          |  5 +++++\n t/t9300-fast-import.sh             | 12 ++++++------\n t/t9301-fast-import-notes.sh       |  2 +-\n usage.c                            | 12 ++++++++++++\n 10 files changed, 73 insertions(+), 24 deletions(-)\n\nRange-diff against v1:\n1:  2e4e3906b1 = 1:  2e4e3906b1 you-still-use-that??: help deprecating commands for removal\n2:  43eb8ec0a8 ! 2:  622456481b whatchanged: require --i-still-use-this\n    @@ Commit message\n         While at it, update the documentation page to use the new [synopsis]\n         facility to mark-up the SYNOPSIS part.\n     \n    +    Two test scripts on fast-import run \"git whatchanged\" without even\n    +    checking the output from it.  It might still help manual debugging\n    +    so I've replaced these calls with \"git log --raw\", but we probably\n    +    are better off removing such useless git operations that do not\n    +    contribute to the tests.  Such a clean-up is left outside the scope\n    +    of this patch.\n    +\n         Signed-off-by: Junio C Hamano <gitster@pobox.com>\n     \n      ## Documentation/git-whatchanged.adoc ##\n    @@ t/t4013-diff-various.sh: diff-tree --stat --compact-summary initial mode\n      test_expect_success 'log -m matches pure log' '\n      \tgit log master >result &&\n      \tprocess_diffs result >expected &&\n    +\n    + ## t/t4202-log.sh ##\n    +@@ t/t4202-log.sh: for cmd in show whatchanged reflog format-patch\n    + do\n    + \tcase \"$cmd\" in\n    + \tformat-patch) myarg=\"HEAD~..\" ;;\n    ++\twhatchanged) myarg=--i-still-use-this ;;\n    + \t*) myarg= ;;\n    + \tesac\n    + \n    +@@ t/t4202-log.sh: test_expect_success 'reflog is expected format' '\n    + '\n    + \n    + test_expect_success 'whatchanged is expected format' '\n    ++\twhatchanged=\"whatchanged --i-still-use-this\" &&\n    + \tgit log --no-merges --raw >expect &&\n    +-\tgit whatchanged >actual &&\n    ++\tgit $whatchanged >actual &&\n    + \ttest_cmp expect actual\n    + '\n    + \n    + test_expect_success 'log.abbrevCommit configuration' '\n    ++\twhatchanged=\"whatchanged --i-still-use-this\" &&\n    ++\n    + \tgit log --abbrev-commit >expect.log.abbrev &&\n    + \tgit log --no-abbrev-commit >expect.log.full &&\n    + \tgit log --pretty=raw >expect.log.raw &&\n    + \tgit reflog --abbrev-commit >expect.reflog.abbrev &&\n    + \tgit reflog --no-abbrev-commit >expect.reflog.full &&\n    +-\tgit whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n    +-\tgit whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n    ++\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n    ++\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n    + \n    + \ttest_config log.abbrevCommit true &&\n    + \n    +@@ t/t4202-log.sh: test_expect_success 'log.abbrevCommit configuration' '\n    + \tgit reflog --no-abbrev-commit >actual &&\n    + \ttest_cmp expect.reflog.full actual &&\n    + \n    +-\tgit whatchanged >actual &&\n    ++\tgit $whatchanged >actual &&\n    + \ttest_cmp expect.whatchanged.abbrev actual &&\n    +-\tgit whatchanged --no-abbrev-commit >actual &&\n    ++\tgit $whatchanged --no-abbrev-commit >actual &&\n    + \ttest_cmp expect.whatchanged.full actual\n    + '\n    + \n    +\n    + ## t/t9300-fast-import.sh ##\n    +@@ t/t9300-fast-import.sh: test_expect_success 'A: create pack from stdin' '\n    + \n    + \tINPUT_END\n    + \tgit fast-import --export-marks=marks.out <input &&\n    +-\tgit whatchanged main\n    ++\tgit log --raw main\n    + '\n    + \n    + test_expect_success 'A: verify pack' '\n    +@@ t/t9300-fast-import.sh: test_expect_success 'A: verify marks import does not crash' '\n    + \tINPUT_END\n    + \n    + \tgit fast-import --import-marks=marks.out <input &&\n    +-\tgit whatchanged verify--import-marks\n    ++\tgit log --raw verify--import-marks\n    + '\n    + \n    + test_expect_success 'A: verify pack' '\n    +@@ t/t9300-fast-import.sh: test_expect_success 'C: incremental import create pack from stdin' '\n    + \tINPUT_END\n    + \n    + \tgit fast-import <input &&\n    +-\tgit whatchanged branch\n    ++\tgit log --raw branch\n    + '\n    + \n    + test_expect_success 'C: verify pack' '\n    +@@ t/t9300-fast-import.sh: test_expect_success 'D: inline data in commit' '\n    + \tINPUT_END\n    + \n    + \tgit fast-import <input &&\n    +-\tgit whatchanged branch\n    ++\tgit log --raw branch\n    + '\n    + \n    + test_expect_success 'D: verify pack' '\n    +@@ t/t9300-fast-import.sh: test_expect_success 'H: deletall, add 1' '\n    + \n    + \tINPUT_END\n    + \tgit fast-import <input &&\n    +-\tgit whatchanged H\n    ++\tgit log --raw H\n    + '\n    + \n    + test_expect_success 'H: verify pack' '\n    +@@ t/t9300-fast-import.sh: test_expect_success 'Q: commit notes' '\n    + \tINPUT_END\n    + \n    + \tgit fast-import <input &&\n    +-\tgit whatchanged notes-test\n    ++\tgit log --raw notes-test\n    + '\n    + \n    + test_expect_success 'Q: verify pack' '\n    +\n    + ## t/t9301-fast-import-notes.sh ##\n    +@@ t/t9301-fast-import-notes.sh: INPUT_END\n    + test_expect_success 'set up main branch' '\n    + \n    + \tgit fast-import <input &&\n    +-\tgit whatchanged main\n    ++\tgit log --raw main\n    + '\n    + \n    + commit4=$(git rev-parse refs/heads/main)\n-- \n2.49.0-599-gc9a5c860a0\n\n"},{"id":"517077","messageId":"20250501225958.2947677-2-gitster@pobox.com","threadId":"63381","inReplyTo":"20250501225958.2947677-1-gitster@pobox.com","subject":"[PATCH v2 1/2] you-still-use-that??: help deprecating commands for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-01T22:59:57Z","receivedAt":"2025-05-01T23:00:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"A command slated for removal like \"git pack-redundant\" gains a\ncommand line option \"--i-still-use-this\", and refuses to work when\nthe option is not given.  The message and the instruction upon\nseeing what to do are both rather long, so before letting another\ncommand to use the same mechanism, factor out the message+die part\ninto a small helper function, and use that.\n\nThe existing pack-redundant test lacked a test to make sure that we\nrequire the --i-still-use-this option.  Add one while we are at it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/pack-redundant.c  | 10 ++--------\n git-compat-util.h         |  2 ++\n t/t5323-pack-redundant.sh |  5 +++++\n usage.c                   | 12 ++++++++++++\n 4 files changed, 21 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c\nindex 3febe732f8..6dc9e020c7 100644\n--- a/builtin/pack-redundant.c\n+++ b/builtin/pack-redundant.c\n@@ -625,14 +625,8 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s\n \t\t\tbreak;\n \t}\n \n-\tif (!i_still_use_this) {\n-\t\tfputs(_(\"'git pack-redundant' is nominated for removal.\\n\"\n-\t\t\t\"If you still use this command, please add an extra\\n\"\n-\t\t\t\"option, '--i-still-use-this', on the command line\\n\"\n-\t\t\t\"and let us know you still use it by sending an e-mail\\n\"\n-\t\t\t\"to <git@vger.kernel.org>.  Thanks.\\n\"), stderr);\n-\t\tdie(_(\"refusing to run without --i-still-use-this\"));\n-\t}\n+\tif (!i_still_use_this)\n+\t\tyou_still_use_that(\"git pack-redundant\");\n \n \tif (load_all_packs)\n \t\tload_all();\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex e123288e8f..21cab99567 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -703,6 +703,8 @@ void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));\n \n void show_usage_if_asked(int ac, const char **av, const char *err);\n \n+NORETURN void you_still_use_that(const char *command_name);\n+\n #ifndef NO_OPENSSL\n #ifdef APPLE_COMMON_CRYPTO\n #include \"compat/apple-common-crypto.h\"\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 688cd9706c..f2f20cfa40 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -45,6 +45,11 @@ fi\n main_repo=main.git\n shared_repo=shared.git\n \n+test_expect_success 'pack-redundant needs --i-still-use-this' '\n+\ttest_must_fail git pack-redundant >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n git_pack_redundant='git pack-redundant --i-still-use-this'\n \n # Create commits in <repo> and assign each commit's oid to shell variables\ndiff --git a/usage.c b/usage.c\nindex 38b46bbbfe..4aaad2b553 100644\n--- a/usage.c\n+++ b/usage.c\n@@ -372,3 +372,15 @@ void bug_fl(const char *file, int line, const char *fmt, ...)\n \ttrace2_cmd_error_va(fmt, ap);\n \tva_end(ap);\n }\n+\n+NORETURN void you_still_use_that(const char *command_name)\n+{\n+\tfprintf(stderr,\n+\t\t_(\"'%s' is nominated for removal.\\n\"\n+\t\t  \"If you still use this command, please add an extra\\n\"\n+\t\t  \"option, '--i-still-use-this', on the command line\\n\"\n+\t\t  \"and let us know you still use it by sending an e-mail\\n\"\n+\t\t  \"to <git@vger.kernel.org>.  Thanks.\\n\"),\n+\t\tcommand_name);\n+\tdie(_(\"refusing to run without --i-still-use-this\"));\n+}\n-- \n2.49.0-599-gc9a5c860a0\n\n"},{"id":"517078","messageId":"20250501225958.2947677-3-gitster@pobox.com","threadId":"63381","inReplyTo":"20250501225958.2947677-1-gitster@pobox.com","subject":"[PATCH v2 2/2] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-01T22:59:58Z","receivedAt":"2025-05-01T23:00:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The documentation of \"git whatchanged\" is pretty explicit that this\nhas retained for historical reasons to help those whose fingers\ncannot be retrained.  Let's see if they still are finding it hard to\ntype \"git log --raw\" instead of \"git whatchanged\" by marking the\ncommand as \"nominated for removal\", and require \"--i-still-use-this\"\non the command line.\n\nWhile at it, update the documentation page to use the new [synopsis]\nfacility to mark-up the SYNOPSIS part.\n\nTwo test scripts on fast-import run \"git whatchanged\" without even\nchecking the output from it.  It might still help manual debugging\nso I've replaced these calls with \"git log --raw\", but we probably\nare better off removing such useless git operations that do not\ncontribute to the tests.  Such a clean-up is left outside the scope\nof this patch.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-whatchanged.adoc | 10 ++++++++--\n builtin/log.c                      | 13 +++++++++++++\n t/t4013-diff-various.sh            | 17 +++++++++++++++--\n t/t4202-log.sh                     | 14 +++++++++-----\n t/t9300-fast-import.sh             | 12 ++++++------\n t/t9301-fast-import-notes.sh       |  2 +-\n 6 files changed, 52 insertions(+), 16 deletions(-)\n\ndiff --git a/Documentation/git-whatchanged.adoc b/Documentation/git-whatchanged.adoc\nindex 8e55e0bb1e..d21484026f 100644\n--- a/Documentation/git-whatchanged.adoc\n+++ b/Documentation/git-whatchanged.adoc\n@@ -8,8 +8,14 @@ git-whatchanged - Show logs with differences each commit introduces\n \n SYNOPSIS\n --------\n-[verse]\n-'git whatchanged' <option>...\n+[synopsis]\n+git whatchanged <option>...\n+\n+WARNING\n+-------\n+`git whatchanged` has been deprecated and is scheduled for removal in\n+a future version of Git, as it is merely `git log` with different\n+default; `whatchanged` is not even shorter to type than `log --raw`.\n \n DESCRIPTION\n -----------\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 04a6ef97bc..0f98ac8a34 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -113,6 +113,13 @@ struct log_config {\n \tint fmt_patch_name_max;\n \tchar *fmt_pretty;\n \tchar *default_date_mode;\n+\n+\t/*\n+\t * Note: git_log_config() does not touch this member and that\n+\t * is very deliberate.  This member is only to be used to\n+\t * resurrect whatchanged that is deprecated.\n+\t */\n+\tint i_still_use_this;\n };\n \n static void log_config_init(struct log_config *cfg)\n@@ -267,6 +274,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tOPT__QUIET(&quiet, N_(\"suppress diff output\")),\n \t\tOPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n \t\tOPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"use mail map file\")),\n+\t\tOPT_HIDDEN_BOOL(0, \"i-still-use-this\", &cfg->i_still_use_this,\n+\t\t\t\t\"<use this deprecated command>\"),\n \t\tOPT_ALIAS(0, \"mailmap\", \"use-mailmap\"),\n \t\tOPT_CALLBACK_F(0, \"clear-decorations\", NULL, NULL,\n \t\t\t       N_(\"clear all previously-defined decoration filters\"),\n@@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,\n \topt.def = \"HEAD\";\n \topt.revarg_opt = REVARG_COMMITTISH;\n \tcmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);\n+\n+\tif (!cfg.i_still_use_this)\n+\t\tyou_still_use_that(\"git whatchanged\");\n+\n \tif (!rev.diffopt.output_format)\n \t\trev.diffopt.output_format = DIFF_FORMAT_RAW;\n \ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 3855d68dbc..8caab2ee38 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -203,11 +203,19 @@ do\n \ttest_expect_success \"git $cmd # magic is ${magic:-(not used)}\" '\n \t\t{\n \t\t\techo \"$ git $cmd\"\n+\n+\t\t\tcase \"$cmd\" in\n+\t\t\twhatchanged | whatchanged\" \"*)\n+\t\t\t\trun=\"whatchanged --i-still-use-this\"\n+\t\t\t\trun=\"$run ${cmd#whatchanged}\" ;;\n+\t\t\t*)\n+\t\t\t\trun=$cmd ;;\n+\t\t\tesac &&\n \t\t\tcase \"$magic\" in\n \t\t\t\"\")\n-\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;\n+\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $run ;;\n \t\t\tnoellipses)\n-\t\t\t\tgit $cmd ;;\n+\t\t\t\tgit $run ;;\n \t\t\tesac |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n \t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n@@ -454,6 +462,11 @@ diff-tree --stat --compact-summary initial mode\n diff-tree -R --stat --compact-summary initial mode\n EOF\n \n+test_expect_success 'whatchanged needs --i-still-use-this' '\n+\ttest_must_fail git whatchanged >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n test_expect_success 'log -m matches pure log' '\n \tgit log master >result &&\n \tprocess_diffs result >expected &&\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 51f7beb59f..ce4c7ab2af 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -490,6 +490,7 @@ for cmd in show whatchanged reflog format-patch\n do\n \tcase \"$cmd\" in\n \tformat-patch) myarg=\"HEAD~..\" ;;\n+\twhatchanged) myarg=--i-still-use-this ;;\n \t*) myarg= ;;\n \tesac\n \n@@ -1202,19 +1203,22 @@ test_expect_success 'reflog is expected format' '\n '\n \n test_expect_success 'whatchanged is expected format' '\n+\twhatchanged=\"whatchanged --i-still-use-this\" &&\n \tgit log --no-merges --raw >expect &&\n-\tgit whatchanged >actual &&\n+\tgit $whatchanged >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'log.abbrevCommit configuration' '\n+\twhatchanged=\"whatchanged --i-still-use-this\" &&\n+\n \tgit log --abbrev-commit >expect.log.abbrev &&\n \tgit log --no-abbrev-commit >expect.log.full &&\n \tgit log --pretty=raw >expect.log.raw &&\n \tgit reflog --abbrev-commit >expect.reflog.abbrev &&\n \tgit reflog --no-abbrev-commit >expect.reflog.full &&\n-\tgit whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n-\tgit whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n+\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n+\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n \n \ttest_config log.abbrevCommit true &&\n \n@@ -1231,9 +1235,9 @@ test_expect_success 'log.abbrevCommit configuration' '\n \tgit reflog --no-abbrev-commit >actual &&\n \ttest_cmp expect.reflog.full actual &&\n \n-\tgit whatchanged >actual &&\n+\tgit $whatchanged >actual &&\n \ttest_cmp expect.whatchanged.abbrev actual &&\n-\tgit whatchanged --no-abbrev-commit >actual &&\n+\tgit $whatchanged --no-abbrev-commit >actual &&\n \ttest_cmp expect.whatchanged.full actual\n '\n \ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex b258dbf1df..4dc3d645bf 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '\n \n \tINPUT_END\n \tgit fast-import --export-marks=marks.out <input &&\n-\tgit whatchanged main\n+\tgit log --raw main\n '\n \n test_expect_success 'A: verify pack' '\n@@ -279,7 +279,7 @@ test_expect_success 'A: verify marks import does not crash' '\n \tINPUT_END\n \n \tgit fast-import --import-marks=marks.out <input &&\n-\tgit whatchanged verify--import-marks\n+\tgit log --raw verify--import-marks\n '\n \n test_expect_success 'A: verify pack' '\n@@ -652,7 +652,7 @@ test_expect_success 'C: incremental import create pack from stdin' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged branch\n+\tgit log --raw branch\n '\n \n test_expect_success 'C: verify pack' '\n@@ -715,7 +715,7 @@ test_expect_success 'D: inline data in commit' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged branch\n+\tgit log --raw branch\n '\n \n test_expect_success 'D: verify pack' '\n@@ -882,7 +882,7 @@ test_expect_success 'H: deletall, add 1' '\n \n \tINPUT_END\n \tgit fast-import <input &&\n-\tgit whatchanged H\n+\tgit log --raw H\n '\n \n test_expect_success 'H: verify pack' '\n@@ -2066,7 +2066,7 @@ test_expect_success 'Q: commit notes' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged notes-test\n+\tgit log --raw notes-test\n '\n \n test_expect_success 'Q: verify pack' '\ndiff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\nindex 1ae4d7c0d3..e62173cf1f 100755\n--- a/t/t9301-fast-import-notes.sh\n+++ b/t/t9301-fast-import-notes.sh\n@@ -76,7 +76,7 @@ INPUT_END\n test_expect_success 'set up main branch' '\n \n \tgit fast-import <input &&\n-\tgit whatchanged main\n+\tgit log --raw main\n '\n \n commit4=$(git rev-parse refs/heads/main)\n-- \n2.49.0-599-gc9a5c860a0\n\n"},{"id":"517099","messageId":"aBSLejDoqomUO3xE@pks.im","threadId":"63381","inReplyTo":"20250501225958.2947677-1-gitster@pobox.com","subject":"Re: [PATCH v2 0/2] Nominating \"whatchanged\" for removal","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-05-02T09:08:10Z","receivedAt":"2025-05-02T09:08:18Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, May 01, 2025 at 03:59:56PM -0700, Junio C Hamano wrote:\n> This does not go far enough to touch the \"Git 3.0 removal\" list in\n> Documentation/BreakingChanges.adoc, but is a preparatory step\n> necessary if we ever wanted to do so in the future.\n\nI'm a little confused. These patches very much feel like starting the\ndeprecation process for git-whatchanged(1), so why wouldn't we at the\nsame time list it as an upcoming breaking change? Or is the intent\nrather to figure out whether anybody is still using this command so that\nwe can then deprecate it after a couple releases if we haven't heard\nback from anybody?\n\nPatrick\n"},{"id":"517100","messageId":"aBSLgTlfwSc1u_bH@pks.im","threadId":"63381","inReplyTo":"20250501225958.2947677-3-gitster@pobox.com","subject":"Re: [PATCH v2 2/2] whatchanged: require --i-still-use-this","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-05-02T09:08:17Z","receivedAt":"2025-05-02T09:08:20Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, May 01, 2025 at 03:59:58PM -0700, Junio C Hamano wrote:\n> diff --git a/builtin/log.c b/builtin/log.c\n> index 04a6ef97bc..0f98ac8a34 100644\n> --- a/builtin/log.c\n> +++ b/builtin/log.c\n> @@ -113,6 +113,13 @@ struct log_config {\n>  \tint fmt_patch_name_max;\n>  \tchar *fmt_pretty;\n>  \tchar *default_date_mode;\n> +\n> +\t/*\n> +\t * Note: git_log_config() does not touch this member and that\n> +\t * is very deliberate.  This member is only to be used to\n> +\t * resurrect whatchanged that is deprecated.\n> +\t */\n> +\tint i_still_use_this;\n>  };\n>  \n>  static void log_config_init(struct log_config *cfg)\n\nI was briefly wondering why this variable wasn't just declared in\n`cmd_whatchanged()`, but that's because parsing is of course done by\n`cmd_log_init_finish()`. Nothing worth thinking about too much.\n\n> @@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,\n>  \topt.def = \"HEAD\";\n>  \topt.revarg_opt = REVARG_COMMITTISH;\n>  \tcmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);\n> +\n> +\tif (!cfg.i_still_use_this)\n> +\t\tyou_still_use_that(\"git whatchanged\");\n> +\n>  \tif (!rev.diffopt.output_format)\n>  \t\trev.diffopt.output_format = DIFF_FORMAT_RAW;\n>  \n\nI think it would help potential users of this command quite a bit if we\nexplicitly told them what the replacement is. So maybe we can extend\n`you_still_use_that()` to accept an explanation?\n\nPatrick\n"},{"id":"517122","messageId":"xmqqselnufit.fsf@gitster.g","threadId":"63381","inReplyTo":"aBSLejDoqomUO3xE@pks.im","subject":"Re: [PATCH v2 0/2] Nominating \"whatchanged\" for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-02T16:46:34Z","receivedAt":"2025-05-02T16:46:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> On Thu, May 01, 2025 at 03:59:56PM -0700, Junio C Hamano wrote:\n>> This does not go far enough to touch the \"Git 3.0 removal\" list in\n>> Documentation/BreakingChanges.adoc, but is a preparatory step\n>> necessary if we ever wanted to do so in the future.\n>\n> I'm a little confused. These patches very much feel like starting the\n> deprecation process for git-whatchanged(1), so why wouldn't we at the\n> same time list it as an upcoming breaking change?\n\nAh, yes, I was overly eager in the documentation change.\n\nTo make an analogy of what happened to pack-redundant, this\ncorresponds to c3b58472 (pack-redundant: gauge the usage before\nproposing its removal, 2020-08-25) plus 4406522b (pack-redundant:\nescalate deprecation warning to an error, 2023-03-23) rolled into\none.  We are gauging the impact of the removal by inconveniencing\nexisting users a big way, with a tiny escape hatch to make them feel\nthe pain, so that we can hear their scream better.\n\nWe are not there yet to announce the decision to deprecate, like\nfcf31daa (pack-redundant: document deprecation, 2023-03-28) did, to\nthose who do not even use the command.  I think it may make sense to\nhold that WARNING part of the change, leaving it to a future step\nthat touches the BreakingChanges document.\n\n> Or is the intent\n> rather to figure out whether anybody is still using this command so that\n> we can then deprecate it after a couple releases if we haven't heard\n> back from anybody?\n\nYes, exactly.\n\nThanks.\n"},{"id":"517123","messageId":"xmqqo6wbufel.fsf@gitster.g","threadId":"63381","inReplyTo":"aBSLgTlfwSc1u_bH@pks.im","subject":"Re: [PATCH v2 2/2] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-02T16:49:06Z","receivedAt":"2025-05-02T16:49:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> I was briefly wondering why this variable wasn't just declared in\n> `cmd_whatchanged()`, but that's because parsing is of course done by\n> `cmd_log_init_finish()`. Nothing worth thinking about too much.\n\nYeah, it is between \"cfg that is conveniently passed around the code\npaths, even though it is not a configuration item\" vs \"a file-scope\nstatic variable that will live until we decide to remove (or keep)\nthe command\".\n\n>> @@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,\n>>  \topt.def = \"HEAD\";\n>>  \topt.revarg_opt = REVARG_COMMITTISH;\n>>  \tcmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);\n>> +\n>> +\tif (!cfg.i_still_use_this)\n>> +\t\tyou_still_use_that(\"git whatchanged\");\n>> +\n>>  \tif (!rev.diffopt.output_format)\n>>  \t\trev.diffopt.output_format = DIFF_FORMAT_RAW;\n>>  \n>\n> I think it would help potential users of this command quite a bit if we\n> explicitly told them what the replacement is. So maybe we can extend\n> `you_still_use_that()` to accept an explanation?\n\nI doubt it.  The reason why we remove something is not \"because a\nbetter alternative exists\"; it is \"because everybody *HAS* switched\nto the better alternative\".  If we need to educate folks in this\nmessage, the plan to remove that command is still premature.\n"},{"id":"517149","messageId":"20250503005814.3030099-1-gitster@pobox.com","threadId":"63381","inReplyTo":"20250501225958.2947677-1-gitster@pobox.com","subject":"[PATCH v3 0/6] Nominating \"whatchanged\" for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-03T00:58:08Z","receivedAt":"2025-05-03T00:58:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"git whatchanged\" has outlived its usefulness when \"git log\" with\nvarious diff-related options more than 10 years ago.  It is not even\nshorter to type than its rough equivalent \"git log --raw\".  It is\nhigh time to start seeing if it is still being used, declare its\nofficial deprecation, and announce its removal in the future.\n\nThis iteration is more complete than the previous two iterations:\n\n * The first step is to refactor the mechanism to show the message\n   to ask users to contact git@vger that they still use the command,\n   out of \"git pack-redundant\" implementation.  This message is\n   shown when the \"--i-still-use-this\" option is not passed to a\n   command that requires it.\n\n * The second and the third step are to remove unnecessary mentions\n   of \"whatchanged\" from our documentation and tests.  With these,\n   we have fewer places that we need to adjust when the command gets\n   truly removed.\n\n * Then we start to require that the \"--i-still-use-this\" option is\n   passed from the command line.  This requires adjustment for tests\n   that protect the behaviour of the command, as they must now pass\n   the required option just like end-users.\n\n * The last two steps are for a future.  In order to make sure that\n   we can cleanly ditch the feature at some future date by removing\n   it from the build, test, and documentation when Git is built with\n   WITH_BREAKING_CHANGES.  And finally we add \"whatchanged\" to the\n   list of features to be removed in the BreakingChanges document.\n\nJunio C Hamano (6):\n  you-still-use-that??: help deprecating commands for removal\n  doc: prepare for a world without whatchanged\n  tests: prepare for a world without whatchanged\n  whatchanged: require --i-still-use-this\n  whatchanged: remove when built with WITH_BREAKING_CHANGES\n  whatschanged: list it in BreakingChanges document\n\n Documentation/BreakingChanges.adoc           |  9 ++++++\n Documentation/MyFirstObjectWalk.adoc         |  4 +--\n Documentation/config/format.adoc             |  6 ++++\n Documentation/config/log.adoc                | 11 +++++--\n Documentation/git-whatchanged.adoc           | 10 ++++--\n Documentation/pretty-options.adoc            |  5 +++\n Documentation/rev-list-options.adoc          |  9 ++++--\n Documentation/technical/sparse-checkout.adoc |  2 +-\n Documentation/user-manual.adoc               |  2 +-\n builtin/log.c                                | 19 +++++++++++\n builtin/pack-redundant.c                     | 10 ++----\n git-compat-util.h                            |  2 ++\n git.c                                        |  2 ++\n t/t4013-diff-various.sh                      | 27 ++++++++++++++--\n t/t4202-log.sh                               | 34 ++++++++++++++------\n t/t5323-pack-redundant.sh                    |  5 +++\n t/t9300-fast-import.sh                       | 12 +++----\n t/t9301-fast-import-notes.sh                 |  2 +-\n usage.c                                      | 12 +++++++\n 19 files changed, 146 insertions(+), 37 deletions(-)\n\n-- \n2.49.0-601-ga5925c3955\n\n"},{"id":"517150","messageId":"20250503005814.3030099-2-gitster@pobox.com","threadId":"63381","inReplyTo":"20250503005814.3030099-1-gitster@pobox.com","subject":"[PATCH v3 1/6] you-still-use-that??: help deprecating commands for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-03T00:58:09Z","receivedAt":"2025-05-03T00:58:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"A command slated for removal like \"git pack-redundant\" gains a\ncommand line option \"--i-still-use-this\", and refuses to work when\nthe option is not given.  The message and the instruction upon\nseeing what to do are both rather long, so before letting another\ncommand to use the same mechanism, factor out the message+die part\ninto a small helper function, and use that.\n\nThe existing pack-redundant test lacked a test to make sure that we\nrequire the --i-still-use-this option.  Add one while we are at it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/pack-redundant.c  | 10 ++--------\n git-compat-util.h         |  2 ++\n t/t5323-pack-redundant.sh |  5 +++++\n usage.c                   | 12 ++++++++++++\n 4 files changed, 21 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c\nindex 3febe732f8..6dc9e020c7 100644\n--- a/builtin/pack-redundant.c\n+++ b/builtin/pack-redundant.c\n@@ -625,14 +625,8 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s\n \t\t\tbreak;\n \t}\n \n-\tif (!i_still_use_this) {\n-\t\tfputs(_(\"'git pack-redundant' is nominated for removal.\\n\"\n-\t\t\t\"If you still use this command, please add an extra\\n\"\n-\t\t\t\"option, '--i-still-use-this', on the command line\\n\"\n-\t\t\t\"and let us know you still use it by sending an e-mail\\n\"\n-\t\t\t\"to <git@vger.kernel.org>.  Thanks.\\n\"), stderr);\n-\t\tdie(_(\"refusing to run without --i-still-use-this\"));\n-\t}\n+\tif (!i_still_use_this)\n+\t\tyou_still_use_that(\"git pack-redundant\");\n \n \tif (load_all_packs)\n \t\tload_all();\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex e123288e8f..21cab99567 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -703,6 +703,8 @@ void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));\n \n void show_usage_if_asked(int ac, const char **av, const char *err);\n \n+NORETURN void you_still_use_that(const char *command_name);\n+\n #ifndef NO_OPENSSL\n #ifdef APPLE_COMMON_CRYPTO\n #include \"compat/apple-common-crypto.h\"\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 688cd9706c..f2f20cfa40 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -45,6 +45,11 @@ fi\n main_repo=main.git\n shared_repo=shared.git\n \n+test_expect_success 'pack-redundant needs --i-still-use-this' '\n+\ttest_must_fail git pack-redundant >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n git_pack_redundant='git pack-redundant --i-still-use-this'\n \n # Create commits in <repo> and assign each commit's oid to shell variables\ndiff --git a/usage.c b/usage.c\nindex 38b46bbbfe..4aaad2b553 100644\n--- a/usage.c\n+++ b/usage.c\n@@ -372,3 +372,15 @@ void bug_fl(const char *file, int line, const char *fmt, ...)\n \ttrace2_cmd_error_va(fmt, ap);\n \tva_end(ap);\n }\n+\n+NORETURN void you_still_use_that(const char *command_name)\n+{\n+\tfprintf(stderr,\n+\t\t_(\"'%s' is nominated for removal.\\n\"\n+\t\t  \"If you still use this command, please add an extra\\n\"\n+\t\t  \"option, '--i-still-use-this', on the command line\\n\"\n+\t\t  \"and let us know you still use it by sending an e-mail\\n\"\n+\t\t  \"to <git@vger.kernel.org>.  Thanks.\\n\"),\n+\t\tcommand_name);\n+\tdie(_(\"refusing to run without --i-still-use-this\"));\n+}\n-- \n2.49.0-601-ga5925c3955\n\n"},{"id":"517151","messageId":"20250503005814.3030099-3-gitster@pobox.com","threadId":"63381","inReplyTo":"20250503005814.3030099-1-gitster@pobox.com","subject":"[PATCH v3 2/6] doc: prepare for a world without whatchanged","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-03T00:58:10Z","receivedAt":"2025-05-03T00:58:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"These documents mention \"whatchanged\" as an example, that can be\nsubstituted by something else.  A new hypothetical command \"walken\"\nwould come near \"whatchanged\" but since the latter may be going\naway, we can say it would come near \"version\", as the fictitious\ncommand sorts between them.  Similarly, we do not have to use\n\"whatchanged\" as an example of a subcommand that is also implemented\nin builtin/log.c file; we can instead mention \"show\".\n\nBoth of these changes allow us not to worry about adjusting these\nplaces when \"whatchanged\" is finally removed.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/MyFirstObjectWalk.adoc | 4 ++--\n Documentation/user-manual.adoc       | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\nindex d6e9dfdbbe..102a465a48 100644\n--- a/Documentation/MyFirstObjectWalk.adoc\n+++ b/Documentation/MyFirstObjectWalk.adoc\n@@ -83,13 +83,13 @@ int cmd_walken(int argc, const char **argv, const char *prefix)\n }\n ----\n \n-Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:\n+Also add the relevant line in `builtin.h` near `cmd_version()`:\n \n ----\n int cmd_walken(int argc, const char **argv, const char *prefix);\n ----\n \n-Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,\n+Include the command in `git.c` in `commands[]` near the entry for `version`,\n maintaining alphabetical ordering:\n \n ----\ndiff --git a/Documentation/user-manual.adoc b/Documentation/user-manual.adoc\nindex d2b478ad23..7124345966 100644\n--- a/Documentation/user-manual.adoc\n+++ b/Documentation/user-manual.adoc\n@@ -4240,7 +4240,7 @@ command `git`.  The source side of a builtin is\n - an entry in `BUILTIN_OBJECTS` in the `Makefile`.\n \n Sometimes, more than one builtin is contained in one source file.  For\n-example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin/log.c`,\n+example, `cmd_show()` and `cmd_log()` both reside in `builtin/log.c`,\n since they share quite a bit of code.  In that case, the commands which are\n _not_ named like the `.c` file in which they live have to be listed in\n `BUILT_INS` in the `Makefile`.\n-- \n2.49.0-601-ga5925c3955\n\n"},{"id":"517152","messageId":"20250503005814.3030099-4-gitster@pobox.com","threadId":"63381","inReplyTo":"20250503005814.3030099-1-gitster@pobox.com","subject":"[PATCH v3 3/6] tests: prepare for a world without whatchanged","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-03T00:58:11Z","receivedAt":"2025-05-03T00:58:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Some tests on fast-import run \"git whatchanged\" without even\nchecking the output from the command.  It is tempting to remove the\ncalls altogether since they are not doing anything useful, but they\npresumably were placed while the tests were developped to manually\nsanity check which paths were touched.\n\nReplace these calls with \"git log --raw\", which is a rough\nequivalent in the more modern Git.\n\nThis does not remove \"git whatchanged\", but we no longer have to\nworry about adjusting these places when we eventually do.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t9300-fast-import.sh       | 12 ++++++------\n t/t9301-fast-import-notes.sh |  2 +-\n 2 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex b258dbf1df..4dc3d645bf 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '\n \n \tINPUT_END\n \tgit fast-import --export-marks=marks.out <input &&\n-\tgit whatchanged main\n+\tgit log --raw main\n '\n \n test_expect_success 'A: verify pack' '\n@@ -279,7 +279,7 @@ test_expect_success 'A: verify marks import does not crash' '\n \tINPUT_END\n \n \tgit fast-import --import-marks=marks.out <input &&\n-\tgit whatchanged verify--import-marks\n+\tgit log --raw verify--import-marks\n '\n \n test_expect_success 'A: verify pack' '\n@@ -652,7 +652,7 @@ test_expect_success 'C: incremental import create pack from stdin' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged branch\n+\tgit log --raw branch\n '\n \n test_expect_success 'C: verify pack' '\n@@ -715,7 +715,7 @@ test_expect_success 'D: inline data in commit' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged branch\n+\tgit log --raw branch\n '\n \n test_expect_success 'D: verify pack' '\n@@ -882,7 +882,7 @@ test_expect_success 'H: deletall, add 1' '\n \n \tINPUT_END\n \tgit fast-import <input &&\n-\tgit whatchanged H\n+\tgit log --raw H\n '\n \n test_expect_success 'H: verify pack' '\n@@ -2066,7 +2066,7 @@ test_expect_success 'Q: commit notes' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged notes-test\n+\tgit log --raw notes-test\n '\n \n test_expect_success 'Q: verify pack' '\ndiff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\nindex 1ae4d7c0d3..e62173cf1f 100755\n--- a/t/t9301-fast-import-notes.sh\n+++ b/t/t9301-fast-import-notes.sh\n@@ -76,7 +76,7 @@ INPUT_END\n test_expect_success 'set up main branch' '\n \n \tgit fast-import <input &&\n-\tgit whatchanged main\n+\tgit log --raw main\n '\n \n commit4=$(git rev-parse refs/heads/main)\n-- \n2.49.0-601-ga5925c3955\n\n"},{"id":"517153","messageId":"20250503005814.3030099-5-gitster@pobox.com","threadId":"63381","inReplyTo":"20250503005814.3030099-1-gitster@pobox.com","subject":"[PATCH v3 4/6] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-03T00:58:12Z","receivedAt":"2025-05-03T00:58:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The documentation of \"git whatchanged\" is pretty explicit that this\nhas retained for historical reasons to help those whose fingers\ncannot be retrained.  Let's see if they still are finding it hard to\ntype \"git log --raw\" instead of \"git whatchanged\" by marking the\ncommand as \"nominated for removal\", and require \"--i-still-use-this\"\non the command line.  Adjust the tests so that the option is passed\nwhen we invoke the command.  In addition, we test that the command\nfails when \"--i-still-use-this\" is not given.\n\nWhile at it, update the documentation page to use the new [synopsis]\nfacility to mark-up the SYNOPSIS part.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-whatchanged.adoc |  4 ++--\n builtin/log.c                      | 13 +++++++++++++\n t/t4013-diff-various.sh            | 17 +++++++++++++++--\n t/t4202-log.sh                     | 14 +++++++++-----\n 4 files changed, 39 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-whatchanged.adoc b/Documentation/git-whatchanged.adoc\nindex 8e55e0bb1e..d400b68d4b 100644\n--- a/Documentation/git-whatchanged.adoc\n+++ b/Documentation/git-whatchanged.adoc\n@@ -8,8 +8,8 @@ git-whatchanged - Show logs with differences each commit introduces\n \n SYNOPSIS\n --------\n-[verse]\n-'git whatchanged' <option>...\n+[synopsis]\n+git whatchanged <option>...\n \n DESCRIPTION\n -----------\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 04a6ef97bc..0f98ac8a34 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -113,6 +113,13 @@ struct log_config {\n \tint fmt_patch_name_max;\n \tchar *fmt_pretty;\n \tchar *default_date_mode;\n+\n+\t/*\n+\t * Note: git_log_config() does not touch this member and that\n+\t * is very deliberate.  This member is only to be used to\n+\t * resurrect whatchanged that is deprecated.\n+\t */\n+\tint i_still_use_this;\n };\n \n static void log_config_init(struct log_config *cfg)\n@@ -267,6 +274,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tOPT__QUIET(&quiet, N_(\"suppress diff output\")),\n \t\tOPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n \t\tOPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"use mail map file\")),\n+\t\tOPT_HIDDEN_BOOL(0, \"i-still-use-this\", &cfg->i_still_use_this,\n+\t\t\t\t\"<use this deprecated command>\"),\n \t\tOPT_ALIAS(0, \"mailmap\", \"use-mailmap\"),\n \t\tOPT_CALLBACK_F(0, \"clear-decorations\", NULL, NULL,\n \t\t\t       N_(\"clear all previously-defined decoration filters\"),\n@@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,\n \topt.def = \"HEAD\";\n \topt.revarg_opt = REVARG_COMMITTISH;\n \tcmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);\n+\n+\tif (!cfg.i_still_use_this)\n+\t\tyou_still_use_that(\"git whatchanged\");\n+\n \tif (!rev.diffopt.output_format)\n \t\trev.diffopt.output_format = DIFF_FORMAT_RAW;\n \ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 3855d68dbc..8caab2ee38 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -203,11 +203,19 @@ do\n \ttest_expect_success \"git $cmd # magic is ${magic:-(not used)}\" '\n \t\t{\n \t\t\techo \"$ git $cmd\"\n+\n+\t\t\tcase \"$cmd\" in\n+\t\t\twhatchanged | whatchanged\" \"*)\n+\t\t\t\trun=\"whatchanged --i-still-use-this\"\n+\t\t\t\trun=\"$run ${cmd#whatchanged}\" ;;\n+\t\t\t*)\n+\t\t\t\trun=$cmd ;;\n+\t\t\tesac &&\n \t\t\tcase \"$magic\" in\n \t\t\t\"\")\n-\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;\n+\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $run ;;\n \t\t\tnoellipses)\n-\t\t\t\tgit $cmd ;;\n+\t\t\t\tgit $run ;;\n \t\t\tesac |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n \t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n@@ -454,6 +462,11 @@ diff-tree --stat --compact-summary initial mode\n diff-tree -R --stat --compact-summary initial mode\n EOF\n \n+test_expect_success 'whatchanged needs --i-still-use-this' '\n+\ttest_must_fail git whatchanged >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n test_expect_success 'log -m matches pure log' '\n \tgit log master >result &&\n \tprocess_diffs result >expected &&\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 51f7beb59f..ce4c7ab2af 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -490,6 +490,7 @@ for cmd in show whatchanged reflog format-patch\n do\n \tcase \"$cmd\" in\n \tformat-patch) myarg=\"HEAD~..\" ;;\n+\twhatchanged) myarg=--i-still-use-this ;;\n \t*) myarg= ;;\n \tesac\n \n@@ -1202,19 +1203,22 @@ test_expect_success 'reflog is expected format' '\n '\n \n test_expect_success 'whatchanged is expected format' '\n+\twhatchanged=\"whatchanged --i-still-use-this\" &&\n \tgit log --no-merges --raw >expect &&\n-\tgit whatchanged >actual &&\n+\tgit $whatchanged >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'log.abbrevCommit configuration' '\n+\twhatchanged=\"whatchanged --i-still-use-this\" &&\n+\n \tgit log --abbrev-commit >expect.log.abbrev &&\n \tgit log --no-abbrev-commit >expect.log.full &&\n \tgit log --pretty=raw >expect.log.raw &&\n \tgit reflog --abbrev-commit >expect.reflog.abbrev &&\n \tgit reflog --no-abbrev-commit >expect.reflog.full &&\n-\tgit whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n-\tgit whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n+\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n+\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n \n \ttest_config log.abbrevCommit true &&\n \n@@ -1231,9 +1235,9 @@ test_expect_success 'log.abbrevCommit configuration' '\n \tgit reflog --no-abbrev-commit >actual &&\n \ttest_cmp expect.reflog.full actual &&\n \n-\tgit whatchanged >actual &&\n+\tgit $whatchanged >actual &&\n \ttest_cmp expect.whatchanged.abbrev actual &&\n-\tgit whatchanged --no-abbrev-commit >actual &&\n+\tgit $whatchanged --no-abbrev-commit >actual &&\n \ttest_cmp expect.whatchanged.full actual\n '\n \n-- \n2.49.0-601-ga5925c3955\n\n"},{"id":"517154","messageId":"20250503005814.3030099-6-gitster@pobox.com","threadId":"63381","inReplyTo":"20250503005814.3030099-1-gitster@pobox.com","subject":"[PATCH v3 5/6] whatchanged: remove when built with WITH_BREAKING_CHANGES","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-03T00:58:13Z","receivedAt":"2025-05-03T00:58:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"As we made \"git whatchanged\" require \"--i-still-use-this\" and asked\nthe users to report if they still want to use it, the logical next\nstep is to allow us build Git without \"whatchanged\" to prepare for\nits eventual removal.\n\nIf we were to follow the pattern established in 8ccc75c2 (remote:\nannounce removal of \"branches/\" and \"remotes/\", 2025-01-22), we can\ndo this together with the documentation update to officially list\nthat the command will be removed in the BreakingChanges document,\nbut let's just keep the changes separate just in case we want to\nproceed a bit slower.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config/format.adoc             |  6 +++++\n Documentation/config/log.adoc                | 11 ++++++--\n Documentation/pretty-options.adoc            |  5 ++++\n Documentation/rev-list-options.adoc          |  9 +++++--\n Documentation/technical/sparse-checkout.adoc |  2 +-\n builtin/log.c                                |  6 +++++\n git.c                                        |  2 ++\n t/t4013-diff-various.sh                      | 12 +++++++--\n t/t4202-log.sh                               | 28 ++++++++++++++------\n 9 files changed, 66 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/config/format.adoc b/Documentation/config/format.adoc\nindex 7410e930e5..ab0710e86a 100644\n--- a/Documentation/config/format.adoc\n+++ b/Documentation/config/format.adoc\n@@ -68,9 +68,15 @@ format.encodeEmailHeaders::\n \tDefaults to true.\n \n format.pretty::\n+ifndef::with-breaking-changes[]\n \tThe default pretty format for log/show/whatchanged command.\n \tSee linkgit:git-log[1], linkgit:git-show[1],\n \tlinkgit:git-whatchanged[1].\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+\tThe default pretty format for log/show command.\n+\tSee linkgit:git-log[1], linkgit:git-show[1].\n+endif::with-breaking-changes[]\n \n format.thread::\n \tThe default threading style for 'git format-patch'.  Can be\ndiff --git a/Documentation/config/log.adoc b/Documentation/config/log.adoc\nindex 9003a82191..a9b160e7de 100644\n--- a/Documentation/config/log.adoc\n+++ b/Documentation/config/log.adoc\n@@ -1,6 +1,13 @@\n log.abbrevCommit::\n-\tIf true, makes linkgit:git-log[1], linkgit:git-show[1], and\n-\tlinkgit:git-whatchanged[1] assume `--abbrev-commit`. You may\n+\tIf true, makes\n+ifndef::with-breaking-changes[]\n+\tlinkgit:git-log[1], linkgit:git-show[1], and\n+\tlinkgit:git-whatchanged[1]\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+\tlinkgit:git-log[1] and linkgit:git-show[1]\n+endif::with-breaking-changes[]\n+\tassume `--abbrev-commit`. You may\n \toverride this option with `--no-abbrev-commit`.\n \n log.date::\ndiff --git a/Documentation/pretty-options.adoc b/Documentation/pretty-options.adoc\nindex 23888cd612..b36e96abe2 100644\n--- a/Documentation/pretty-options.adoc\n+++ b/Documentation/pretty-options.adoc\n@@ -62,7 +62,12 @@ ifndef::git-rev-list[]\n --notes[=<ref>]::\n \tShow the notes (see linkgit:git-notes[1]) that annotate the\n \tcommit, when showing the commit log message.  This is the default\n+ifndef::with-breaking-changes[]\n \tfor `git log`, `git show` and `git whatchanged` commands when\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+\tfor `git log` and `git show` commands when\n+endif::with-breaking-changes[]\n \tthere is no `--pretty`, `--format`, or `--oneline` option given\n \ton the command line.\n +\ndiff --git a/Documentation/rev-list-options.adoc b/Documentation/rev-list-options.adoc\nindex 785c0786e0..ee5c5c9489 100644\n--- a/Documentation/rev-list-options.adoc\n+++ b/Documentation/rev-list-options.adoc\n@@ -1074,8 +1074,13 @@ Commit Formatting\n \n ifdef::git-rev-list[]\n Using these options, linkgit:git-rev-list[1] will act similar to the\n-more specialized family of commit log tools: linkgit:git-log[1],\n-linkgit:git-show[1], and linkgit:git-whatchanged[1]\n+more specialized family of commit log tools:\n+ifndef::with-breaking-changes[]\n+linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1].\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+linkgit:git-log[1] and linkgit:git-show[1].\n+endif::with-breaking-changes[]\n endif::git-rev-list[]\n \n include::pretty-options.adoc[]\ndiff --git a/Documentation/technical/sparse-checkout.adoc b/Documentation/technical/sparse-checkout.adoc\nindex d968659354..67134bb768 100644\n--- a/Documentation/technical/sparse-checkout.adoc\n+++ b/Documentation/technical/sparse-checkout.adoc\n@@ -442,7 +442,7 @@ understanding these differences can be beneficial.\n       * blame (only matters when one or more -C flags are passed)\n \t* and annotate\n       * log\n-      * whatchanged\n+      * whatchanged (may not exist anymore)\n       * ls-files\n       * diff-index\n       * diff-tree\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 0f98ac8a34..1d0ae645ab 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -114,12 +114,14 @@ struct log_config {\n \tchar *fmt_pretty;\n \tchar *default_date_mode;\n \n+#ifndef WITH_BREAKING_CHANGES\n \t/*\n \t * Note: git_log_config() does not touch this member and that\n \t * is very deliberate.  This member is only to be used to\n \t * resurrect whatchanged that is deprecated.\n \t */\n \tint i_still_use_this;\n+#endif\n };\n \n static void log_config_init(struct log_config *cfg)\n@@ -274,8 +276,10 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tOPT__QUIET(&quiet, N_(\"suppress diff output\")),\n \t\tOPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n \t\tOPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"use mail map file\")),\n+#ifndef WITH_BREAKING_CHANGES\n \t\tOPT_HIDDEN_BOOL(0, \"i-still-use-this\", &cfg->i_still_use_this,\n \t\t\t\t\"<use this deprecated command>\"),\n+#endif\n \t\tOPT_ALIAS(0, \"mailmap\", \"use-mailmap\"),\n \t\tOPT_CALLBACK_F(0, \"clear-decorations\", NULL, NULL,\n \t\t\t       N_(\"clear all previously-defined decoration filters\"),\n@@ -642,6 +646,7 @@ static int git_log_config(const char *var, const char *value,\n \treturn git_diff_ui_config(var, value, ctx, cb);\n }\n \n+#ifndef WITH_BREAKING_CHANGES\n int cmd_whatchanged(int argc,\n \t\t    const char **argv,\n \t\t    const char *prefix,\n@@ -678,6 +683,7 @@ int cmd_whatchanged(int argc,\n \tlog_config_release(&cfg);\n \treturn ret;\n }\n+#endif\n \n static void show_tagger(const char *buf, struct rev_info *rev)\n {\ndiff --git a/git.c b/git.c\nindex 450d6aaa86..b84db92cb5 100644\n--- a/git.c\n+++ b/git.c\n@@ -645,7 +645,9 @@ static struct cmd_struct commands[] = {\n \t{ \"verify-pack\", cmd_verify_pack },\n \t{ \"verify-tag\", cmd_verify_tag, RUN_SETUP },\n \t{ \"version\", cmd_version },\n+#ifndef WITH_BREAKING_CHANGES\n \t{ \"whatchanged\", cmd_whatchanged, RUN_SETUP },\n+#endif\n \t{ \"worktree\", cmd_worktree, RUN_SETUP },\n \t{ \"write-tree\", cmd_write_tree, RUN_SETUP },\n };\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 8caab2ee38..8e38df1685 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -200,7 +200,15 @@ do\n \texpect=\"$TEST_DIRECTORY/t4013/diff.$test\"\n \tactual=\"$pfx-diff.$test\"\n \n-\ttest_expect_success \"git $cmd # magic is ${magic:-(not used)}\" '\n+\tcase \"$cmd\" in\n+\twhatchanged | whatchanged\" \"*)\n+\t\tprereq=WITHOUT_BREAKING_CHANGES\n+\t\t;;\n+\t*)\n+\t\tprereq=;;\n+\tesac\n+\n+\ttest_expect_success $prereq \"git $cmd # magic is ${magic:-(not used)}\" '\n \t\t{\n \t\t\techo \"$ git $cmd\"\n \n@@ -462,7 +470,7 @@ diff-tree --stat --compact-summary initial mode\n diff-tree -R --stat --compact-summary initial mode\n EOF\n \n-test_expect_success 'whatchanged needs --i-still-use-this' '\n+test_expect_success WITHOUT_BREAKING_CHANGES 'whatchanged needs --i-still-use-this' '\n \ttest_must_fail git whatchanged >message 2>&1 &&\n \ttest_grep \"nominated for removal\" message\n '\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex ce4c7ab2af..ad05f6772f 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -486,7 +486,12 @@ test_expect_success !FAIL_PREREQS 'log with various grep.patternType configurati\n \t)\n '\n \n-for cmd in show whatchanged reflog format-patch\n+cmds=\"show reflog format-patch\"\n+if test_have_prereq WITHOUT_BREAKING_CHANGES\n+then\n+\tcmds=\"$cmds whatchanged\"\n+fi\n+for cmd in $cmds\n do\n \tcase \"$cmd\" in\n \tformat-patch) myarg=\"HEAD~..\" ;;\n@@ -1202,7 +1207,7 @@ test_expect_success 'reflog is expected format' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'whatchanged is expected format' '\n+test_expect_success WITHOUT_BREAKING_CHANGES 'whatchanged is expected format' '\n \twhatchanged=\"whatchanged --i-still-use-this\" &&\n \tgit log --no-merges --raw >expect &&\n \tgit $whatchanged >actual &&\n@@ -1217,8 +1222,12 @@ test_expect_success 'log.abbrevCommit configuration' '\n \tgit log --pretty=raw >expect.log.raw &&\n \tgit reflog --abbrev-commit >expect.reflog.abbrev &&\n \tgit reflog --no-abbrev-commit >expect.reflog.full &&\n-\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n-\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n+\n+\tif test_have_prereq WITHOUT_BREAKING_CHANGES\n+\tthen\n+\t\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n+\t\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full\n+\tfi &&\n \n \ttest_config log.abbrevCommit true &&\n \n@@ -1235,10 +1244,13 @@ test_expect_success 'log.abbrevCommit configuration' '\n \tgit reflog --no-abbrev-commit >actual &&\n \ttest_cmp expect.reflog.full actual &&\n \n-\tgit $whatchanged >actual &&\n-\ttest_cmp expect.whatchanged.abbrev actual &&\n-\tgit $whatchanged --no-abbrev-commit >actual &&\n-\ttest_cmp expect.whatchanged.full actual\n+\tif test_have_prereq WITHOUT_BREAKING_CHANGES\n+\tthen\n+\t\tgit $whatchanged >actual &&\n+\t\ttest_cmp expect.whatchanged.abbrev actual &&\n+\t\tgit $whatchanged --no-abbrev-commit >actual &&\n+\t\ttest_cmp expect.whatchanged.full actual\n+\tfi\n '\n \n test_expect_success '--abbrev-commit with core.abbrev=false' '\n-- \n2.49.0-601-ga5925c3955\n\n"},{"id":"517155","messageId":"20250503005814.3030099-7-gitster@pobox.com","threadId":"63381","inReplyTo":"20250503005814.3030099-1-gitster@pobox.com","subject":"[PATCH v3 6/6] whatschanged: list it in BreakingChanges document","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-03T00:58:14Z","receivedAt":"2025-05-03T00:58:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This can be squashed into the previous step.  That is how our \"git\npack-redundant\" conversion did.\n\nTheoretically, however, those who want to gauge the need to keep the\ncommand by exposing their users to patches before this one may want\nto wait until their experiment finishes before they formally say\n\"this will go away\".  \n\nThis change is made into a separate patch from the previous step\nprecisely to help those folks.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/BreakingChanges.adoc | 9 +++++++++\n Documentation/git-whatchanged.adoc | 6 ++++++\n 2 files changed, 15 insertions(+)\n\ndiff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\nindex bdfad29d8a..f9026d004c 100644\n--- a/Documentation/BreakingChanges.adoc\n+++ b/Documentation/BreakingChanges.adoc\n@@ -178,6 +178,15 @@ references.\n +\n These features will be removed.\n \n+* The git-whatchanged(1) command has outlived its usefulness more than\n+  10 years ago, and takes more keystrokes to type than its rough\n+  equivalent `git log --raw`.  We have nominated the command for\n+  removal, have changed the command to refuse to work unless the\n+  `--i-still-use-this` option is given, and asked the users to report\n+  when they do so.  So far there hasn't been a single complaint.\n++\n+The command will be removed\n+\n == Superseded features that will not be deprecated\n \n Some features have gained newer replacements that aim to improve the design in\ndiff --git a/Documentation/git-whatchanged.adoc b/Documentation/git-whatchanged.adoc\nindex d400b68d4b..d21484026f 100644\n--- a/Documentation/git-whatchanged.adoc\n+++ b/Documentation/git-whatchanged.adoc\n@@ -11,6 +11,12 @@ SYNOPSIS\n [synopsis]\n git whatchanged <option>...\n \n+WARNING\n+-------\n+`git whatchanged` has been deprecated and is scheduled for removal in\n+a future version of Git, as it is merely `git log` with different\n+default; `whatchanged` is not even shorter to type than `log --raw`.\n+\n DESCRIPTION\n -----------\n \n-- \n2.49.0-601-ga5925c3955\n\n"},{"id":"517199","messageId":"aBhWXFj4M9Alj4uw@pks.im","threadId":"63381","inReplyTo":"xmqqo6wbufel.fsf@gitster.g","subject":"Re: [PATCH v2 2/2] whatchanged: require --i-still-use-this","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-05-05T06:10:36Z","receivedAt":"2025-05-05T06:10:40Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Fri, May 02, 2025 at 09:49:06AM -0700, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> >> @@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,\n> >>  \topt.def = \"HEAD\";\n> >>  \topt.revarg_opt = REVARG_COMMITTISH;\n> >>  \tcmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);\n> >> +\n> >> +\tif (!cfg.i_still_use_this)\n> >> +\t\tyou_still_use_that(\"git whatchanged\");\n> >> +\n> >>  \tif (!rev.diffopt.output_format)\n> >>  \t\trev.diffopt.output_format = DIFF_FORMAT_RAW;\n> >>  \n> >\n> > I think it would help potential users of this command quite a bit if we\n> > explicitly told them what the replacement is. So maybe we can extend\n> > `you_still_use_that()` to accept an explanation?\n> \n> I doubt it.  The reason why we remove something is not \"because a\n> better alternative exists\"; it is \"because everybody *HAS* switched\n> to the better alternative\".  If we need to educate folks in this\n> message, the plan to remove that command is still premature.\n\nThat's a fair point indeed.\n\nPatrick\n"},{"id":"517207","messageId":"aBhhAZJYXAhBVw61@pks.im","threadId":"63381","inReplyTo":"20250503005814.3030099-5-gitster@pobox.com","subject":"Re: [PATCH v3 4/6] whatchanged: require --i-still-use-this","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-05-05T06:56:01Z","receivedAt":"2025-05-05T06:56:09Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Fri, May 02, 2025 at 05:58:12PM -0700, Junio C Hamano wrote:\n> The documentation of \"git whatchanged\" is pretty explicit that this\n> has retained for historical reasons to help those whose fingers\n\nI feel like there's a word missing here. Maybe \"that this command has\nbeen retained\"?\n\n> cannot be retrained.  Let's see if they still are finding it hard to\n> type \"git log --raw\" instead of \"git whatchanged\" by marking the\n> command as \"nominated for removal\", and require \"--i-still-use-this\"\n> on the command line.  Adjust the tests so that the option is passed\n> when we invoke the command.  In addition, we test that the command\n> fails when \"--i-still-use-this\" is not given.\n> \n> While at it, update the documentation page to use the new [synopsis]\n> facility to mark-up the SYNOPSIS part.\n\nThis while-at-it change feels a bit funny given that we don't touch the\ndocs at all, but I don't mind it too much.\n\nPatrick\n"},{"id":"517208","messageId":"aBhhCF7JpmTq78TE@pks.im","threadId":"63381","inReplyTo":"20250503005814.3030099-4-gitster@pobox.com","subject":"Re: [PATCH v3 3/6] tests: prepare for a world without whatchanged","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-05-05T06:56:08Z","receivedAt":"2025-05-05T06:56:12Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Fri, May 02, 2025 at 05:58:11PM -0700, Junio C Hamano wrote:\n> Some tests on fast-import run \"git whatchanged\" without even\n> checking the output from the command.  It is tempting to remove the\n> calls altogether since they are not doing anything useful, but they\n> presumably were placed while the tests were developped to manually\n\ns/developped/developed/\n\nPatrick\n"},{"id":"517209","messageId":"aBhhDAZTLJQTIQSC@pks.im","threadId":"63381","inReplyTo":"20250503005814.3030099-6-gitster@pobox.com","subject":"Re: [PATCH v3 5/6] whatchanged: remove when built with WITH_BREAKING_CHANGES","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-05-05T06:56:12Z","receivedAt":"2025-05-05T06:56:15Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Fri, May 02, 2025 at 05:58:13PM -0700, Junio C Hamano wrote:\n> As we made \"git whatchanged\" require \"--i-still-use-this\" and asked\n> the users to report if they still want to use it, the logical next\n> step is to allow us build Git without \"whatchanged\" to prepare for\n> its eventual removal.\n> \n> If we were to follow the pattern established in 8ccc75c2 (remote:\n> announce removal of \"branches/\" and \"remotes/\", 2025-01-22), we can\n> do this together with the documentation update to officially list\n> that the command will be removed in the BreakingChanges document,\n> but let's just keep the changes separate just in case we want to\n> proceed a bit slower.\n\nWe'd also need to adjust Meson so that it doesn't install the\ndocumentation anymore. So something like the below (untested) patch.\n\nPatrick\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex b109d25e9c8..815b0334e53 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -510,7 +510,7 @@ lint-docs-meson:\n \tawk \"/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^  \\047/, \\\"\\\"); gsub(/\\047 : [157],\\$$/, \\\"\\\"); print }\" meson.build | \\\n \t\tgrep -v -e '#' -e '^$$' | \\\n \t\tsort >tmp-meson-diff/meson.adoc && \\\n-\tls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \\\n+\tls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-whatchanged.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \\\n \tif ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \\\n \t\techo \"Meson man pages differ from actual man pages:\"; \\\n \t\tdiff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \\\ndiff --git a/Documentation/meson.build b/Documentation/meson.build\nindex 1433acfd310..2fe1a1369d4 100644\n--- a/Documentation/meson.build\n+++ b/Documentation/meson.build\n@@ -158,7 +158,6 @@ manpages = {\n   'git-verify-tag.adoc' : 1,\n   'git-version.adoc' : 1,\n   'git-web--browse.adoc' : 1,\n-  'git-whatchanged.adoc' : 1,\n   'git-worktree.adoc' : 1,\n   'git-write-tree.adoc' : 1,\n   'git.adoc' : 1,\n@@ -207,6 +206,7 @@ manpages = {\n \n manpages_breaking_changes = {\n   'git-pack-redundant.adoc' : 1,\n+  'git-whatchanged.adoc' : 1,\n }\n \n if not get_option('breaking_changes')\n\n"},{"id":"517277","messageId":"xmqqfrhiokal.fsf@gitster.g","threadId":"63381","inReplyTo":"aBhhAZJYXAhBVw61@pks.im","subject":"Re: [PATCH v3 4/6] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-05T20:49:06Z","receivedAt":"2025-05-05T20:49:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n>> While at it, update the documentation page to use the new [synopsis]\n>> facility to mark-up the SYNOPSIS part.\n>\n> This while-at-it change feels a bit funny given that we don't touch the\n> docs at all, but I don't mind it too much.\n\nYeah, that exactly was what I was thinking while rereading the\npatches.  I think it may make a better organization to delay it till\nthe very end where we do add new material to the file.\n\nThanks.\n"},{"id":"517278","messageId":"xmqqbjs6ojvy.fsf@gitster.g","threadId":"63381","inReplyTo":"aBhhDAZTLJQTIQSC@pks.im","subject":"Re: [PATCH v3 5/6] whatchanged: remove when built with WITH_BREAKING_CHANGES","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-05T20:57:53Z","receivedAt":"2025-05-05T20:57:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> On Fri, May 02, 2025 at 05:58:13PM -0700, Junio C Hamano wrote:\n>> As we made \"git whatchanged\" require \"--i-still-use-this\" and asked\n>> the users to report if they still want to use it, the logical next\n>> step is to allow us build Git without \"whatchanged\" to prepare for\n>> its eventual removal.\n>> \n>> If we were to follow the pattern established in 8ccc75c2 (remote:\n>> announce removal of \"branches/\" and \"remotes/\", 2025-01-22), we can\n>> do this together with the documentation update to officially list\n>> that the command will be removed in the BreakingChanges document,\n>> but let's just keep the changes separate just in case we want to\n>> proceed a bit slower.\n>\n> We'd also need to adjust Meson so that it doesn't install the\n> documentation anymore. So something like the below (untested) patch.\n\nThanks.\n\n> diff --git a/Documentation/Makefile b/Documentation/Makefile\n> index b109d25e9c8..815b0334e53 100644\n> --- a/Documentation/Makefile\n> +++ b/Documentation/Makefile\n> @@ -510,7 +510,7 @@ lint-docs-meson:\n>  \tawk \"/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^  \\047/, \\\"\\\"); gsub(/\\047 : [157],\\$$/, \\\"\\\"); print }\" meson.build | \\\n>  \t\tgrep -v -e '#' -e '^$$' | \\\n>  \t\tsort >tmp-meson-diff/meson.adoc && \\\n> -\tls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \\\n> +\tls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-whatchanged.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \\\n\nYuck.\n\n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index 1433acfd310..2fe1a1369d4 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -158,7 +158,6 @@ manpages = {\n>    'git-verify-tag.adoc' : 1,\n>    'git-version.adoc' : 1,\n>    'git-web--browse.adoc' : 1,\n> -  'git-whatchanged.adoc' : 1,\n>    'git-worktree.adoc' : 1,\n>    'git-write-tree.adoc' : 1,\n>    'git.adoc' : 1,\n> @@ -207,6 +206,7 @@ manpages = {\n>  \n>  manpages_breaking_changes = {\n>    'git-pack-redundant.adoc' : 1,\n> +  'git-whatchanged.adoc' : 1,\n>  }\n\nOK.\n\nThanks.\n"},{"id":"517882","messageId":"CABPp-BH-=J+VEuk-61FkB8ETeUQCZPWysOOSdvg7G0-gBVq7BA@mail.gmail.com","threadId":"63381","inReplyTo":"20250503005814.3030099-2-gitster@pobox.com","subject":"Re: [PATCH v3 1/6] you-still-use-that??: help deprecating commands for removal","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2025-05-12T17:35:54Z","receivedAt":"2025-05-12T17:36:06Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Fri, May 2, 2025 at 5:58 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> A command slated for removal like \"git pack-redundant\" gains a\n> command line option \"--i-still-use-this\", and refuses to work when\n> the option is not given.  The message and the instruction upon\n> seeing what to do are both rather long, so before letting another\n> command to use the same mechanism, factor out the message+die part\n> into a small helper function, and use that.\n>\n> The existing pack-redundant test lacked a test to make sure that we\n> require the --i-still-use-this option.  Add one while we are at it.\n\nThe \"gains a command line option\" made me think you were discussing a\nchange made by this patch, rather than discussing an existing\nmechanism.  Could I spitball an alternative?  Maybe something like...\n\n\nCommands slated for removal, like \"git pack-redundant\", now require an\nexplicit --i-still-use-this option to run. This discourages casual use and\nsurfaces their pending deprecation to users.\n\nThe warning message is long, so we factor it into a helper function\n(you_still_use_that()) to simplify reuse by other commands.\n\nAlso add a missing test to ensure this enforcement works for\n\"pack-redundant\".\n\n\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  builtin/pack-redundant.c  | 10 ++--------\n>  git-compat-util.h         |  2 ++\n>  t/t5323-pack-redundant.sh |  5 +++++\n>  usage.c                   | 12 ++++++++++++\n>  4 files changed, 21 insertions(+), 8 deletions(-)\n>\n> diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c\n> index 3febe732f8..6dc9e020c7 100644\n> --- a/builtin/pack-redundant.c\n> +++ b/builtin/pack-redundant.c\n> @@ -625,14 +625,8 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s\n>                         break;\n>         }\n>\n> -       if (!i_still_use_this) {\n> -               fputs(_(\"'git pack-redundant' is nominated for removal.\\n\"\n> -                       \"If you still use this command, please add an extra\\n\"\n> -                       \"option, '--i-still-use-this', on the command line\\n\"\n> -                       \"and let us know you still use it by sending an e-mail\\n\"\n> -                       \"to <git@vger.kernel.org>.  Thanks.\\n\"), stderr);\n> -               die(_(\"refusing to run without --i-still-use-this\"));\n> -       }\n> +       if (!i_still_use_this)\n> +               you_still_use_that(\"git pack-redundant\");\n>\n>         if (load_all_packs)\n>                 load_all();\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index e123288e8f..21cab99567 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -703,6 +703,8 @@ void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));\n>\n>  void show_usage_if_asked(int ac, const char **av, const char *err);\n>\n> +NORETURN void you_still_use_that(const char *command_name);\n> +\n>  #ifndef NO_OPENSSL\n>  #ifdef APPLE_COMMON_CRYPTO\n>  #include \"compat/apple-common-crypto.h\"\n> diff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\n> index 688cd9706c..f2f20cfa40 100755\n> --- a/t/t5323-pack-redundant.sh\n> +++ b/t/t5323-pack-redundant.sh\n> @@ -45,6 +45,11 @@ fi\n>  main_repo=main.git\n>  shared_repo=shared.git\n>\n> +test_expect_success 'pack-redundant needs --i-still-use-this' '\n> +       test_must_fail git pack-redundant >message 2>&1 &&\n> +       test_grep \"nominated for removal\" message\n> +'\n> +\n>  git_pack_redundant='git pack-redundant --i-still-use-this'\n>\n>  # Create commits in <repo> and assign each commit's oid to shell variables\n> diff --git a/usage.c b/usage.c\n> index 38b46bbbfe..4aaad2b553 100644\n> --- a/usage.c\n> +++ b/usage.c\n> @@ -372,3 +372,15 @@ void bug_fl(const char *file, int line, const char *fmt, ...)\n>         trace2_cmd_error_va(fmt, ap);\n>         va_end(ap);\n>  }\n> +\n> +NORETURN void you_still_use_that(const char *command_name)\n> +{\n> +       fprintf(stderr,\n> +               _(\"'%s' is nominated for removal.\\n\"\n> +                 \"If you still use this command, please add an extra\\n\"\n> +                 \"option, '--i-still-use-this', on the command line\\n\"\n> +                 \"and let us know you still use it by sending an e-mail\\n\"\n> +                 \"to <git@vger.kernel.org>.  Thanks.\\n\"),\n> +               command_name);\n> +       die(_(\"refusing to run without --i-still-use-this\"));\n> +}\n> --\n> 2.49.0-601-ga5925c3955\n\nPatch looks good.\n"},{"id":"517883","messageId":"CABPp-BGXT5w8UxfnbELLFNvVQ1LTSj0oZVFi-XvCZ=0=NXUnEQ@mail.gmail.com","threadId":"63381","inReplyTo":"20250503005814.3030099-3-gitster@pobox.com","subject":"Re: [PATCH v3 2/6] doc: prepare for a world without whatchanged","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2025-05-12T17:36:23Z","receivedAt":"2025-05-12T17:36:35Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Fri, May 2, 2025 at 5:58 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> These documents mention \"whatchanged\" as an example, that can be\n> substituted by something else.\n\nPerhaps:\n\nThese documents mention \"whatchanged\" as an example, which can be\nsubstituted with something else.\n\n?\n\n>  A new hypothetical command \"walken\"\n> would come near \"whatchanged\" but since the latter may be going\n> away, we can say it would come near \"version\", as the fictitious\n> command sorts between them.  Similarly, we do not have to use\n> \"whatchanged\" as an example of a subcommand that is also implemented\n> in builtin/log.c file; we can instead mention \"show\".\n>\n> Both of these changes allow us not to worry about adjusting these\n> places when \"whatchanged\" is finally removed.\n\nCould I suggest (now changing my previous suggestion to handle the\nentire commit message):\n\ndoc: prepare for a world without whatchanged\n\nSome documentation examples reference `whatchanged`, either as a\nplaceholder command or as an example of source structure.\n\nTo reduce the need for future edits when `whatchanged` is removed,\nthese references are replaced with alternatives:\n\n- In `MyFirstObjectWalk.adoc`, we use `version` as the nearby anchor\n  point for `walken`, instead of `whatchanged`.\n- In `user-manual.adoc`, we now cite `show` instead of `whatchanged`\n  as a command that coexists with `log` in builtin/log.c.\n\nThis avoids needing further cleanup when `whatchanged` is retired.\n\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  Documentation/MyFirstObjectWalk.adoc | 4 ++--\n>  Documentation/user-manual.adoc       | 2 +-\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\n> index d6e9dfdbbe..102a465a48 100644\n> --- a/Documentation/MyFirstObjectWalk.adoc\n> +++ b/Documentation/MyFirstObjectWalk.adoc\n> @@ -83,13 +83,13 @@ int cmd_walken(int argc, const char **argv, const char *prefix)\n>  }\n>  ----\n>\n> -Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:\n> +Also add the relevant line in `builtin.h` near `cmd_version()`:\n>\n>  ----\n>  int cmd_walken(int argc, const char **argv, const char *prefix);\n>  ----\n>\n> -Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,\n> +Include the command in `git.c` in `commands[]` near the entry for `version`,\n>  maintaining alphabetical ordering:\n>\n>  ----\n> diff --git a/Documentation/user-manual.adoc b/Documentation/user-manual.adoc\n> index d2b478ad23..7124345966 100644\n> --- a/Documentation/user-manual.adoc\n> +++ b/Documentation/user-manual.adoc\n> @@ -4240,7 +4240,7 @@ command `git`.  The source side of a builtin is\n>  - an entry in `BUILTIN_OBJECTS` in the `Makefile`.\n>\n>  Sometimes, more than one builtin is contained in one source file.  For\n> -example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin/log.c`,\n> +example, `cmd_show()` and `cmd_log()` both reside in `builtin/log.c`,\n>  since they share quite a bit of code.  In that case, the commands which are\n>  _not_ named like the `.c` file in which they live have to be listed in\n>  `BUILT_INS` in the `Makefile`.\n> --\n> 2.49.0-601-ga5925c3955\n\nPatch looks good.\n"},{"id":"517884","messageId":"CABPp-BHWjspvWWXpv9ZYmbNzWBHe+w8nxDrpT-nebpZBYT_wSA@mail.gmail.com","threadId":"63381","inReplyTo":"20250503005814.3030099-4-gitster@pobox.com","subject":"Re: [PATCH v3 3/6] tests: prepare for a world without whatchanged","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2025-05-12T17:36:38Z","receivedAt":"2025-05-12T17:36:50Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Fri, May 2, 2025 at 5:58 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Some tests on fast-import run \"git whatchanged\" without even\n> checking the output from the command.  It is tempting to remove the\n> calls altogether since they are not doing anything useful, but they\n> presumably were placed while the tests were developped to manually\n\nPerhaps use \"invoked\" (or \"used\" or \"employed\") rather than \"placed\"?\n\"placed\" feels a bit awkward here.\n\n(and there's the developped typo that Patrick already pointed out.)\n\n> sanity check which paths were touched.\n>\n> Replace these calls with \"git log --raw\", which is a rough\n> equivalent in the more modern Git.\n>\n> This does not remove \"git whatchanged\", but we no longer have to\n> worry about adjusting these places when we eventually do.\n\nSeems like a definite positive change.\n\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  t/t9300-fast-import.sh       | 12 ++++++------\n>  t/t9301-fast-import-notes.sh |  2 +-\n>  2 files changed, 7 insertions(+), 7 deletions(-)\n>\n> diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\n> index b258dbf1df..4dc3d645bf 100755\n> --- a/t/t9300-fast-import.sh\n> +++ b/t/t9300-fast-import.sh\n> @@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '\n>\n>         INPUT_END\n>         git fast-import --export-marks=marks.out <input &&\n> -       git whatchanged main\n> +       git log --raw main\n>  '\n>\n>  test_expect_success 'A: verify pack' '\n> @@ -279,7 +279,7 @@ test_expect_success 'A: verify marks import does not crash' '\n>         INPUT_END\n>\n>         git fast-import --import-marks=marks.out <input &&\n> -       git whatchanged verify--import-marks\n> +       git log --raw verify--import-marks\n>  '\n>\n>  test_expect_success 'A: verify pack' '\n> @@ -652,7 +652,7 @@ test_expect_success 'C: incremental import create pack from stdin' '\n>         INPUT_END\n>\n>         git fast-import <input &&\n> -       git whatchanged branch\n> +       git log --raw branch\n>  '\n>\n>  test_expect_success 'C: verify pack' '\n> @@ -715,7 +715,7 @@ test_expect_success 'D: inline data in commit' '\n>         INPUT_END\n>\n>         git fast-import <input &&\n> -       git whatchanged branch\n> +       git log --raw branch\n>  '\n>\n>  test_expect_success 'D: verify pack' '\n> @@ -882,7 +882,7 @@ test_expect_success 'H: deletall, add 1' '\n>\n>         INPUT_END\n>         git fast-import <input &&\n> -       git whatchanged H\n> +       git log --raw H\n>  '\n>\n>  test_expect_success 'H: verify pack' '\n> @@ -2066,7 +2066,7 @@ test_expect_success 'Q: commit notes' '\n>         INPUT_END\n>\n>         git fast-import <input &&\n> -       git whatchanged notes-test\n> +       git log --raw notes-test\n>  '\n>\n>  test_expect_success 'Q: verify pack' '\n> diff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\n> index 1ae4d7c0d3..e62173cf1f 100755\n> --- a/t/t9301-fast-import-notes.sh\n> +++ b/t/t9301-fast-import-notes.sh\n> @@ -76,7 +76,7 @@ INPUT_END\n>  test_expect_success 'set up main branch' '\n>\n>         git fast-import <input &&\n> -       git whatchanged main\n> +       git log --raw main\n>  '\n>\n>  commit4=$(git rev-parse refs/heads/main)\n> --\n> 2.49.0-601-ga5925c3955\n\nLooks good.\n"},{"id":"517885","messageId":"CABPp-BE3Qh55=6GR7s-Wv2rS9+oAFokw=9R_1WiayLWDMsuAVA@mail.gmail.com","threadId":"63381","inReplyTo":"20250503005814.3030099-7-gitster@pobox.com","subject":"Re: [PATCH v3 6/6] whatschanged: list it in BreakingChanges document","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2025-05-12T17:36:50Z","receivedAt":"2025-05-12T17:37:13Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Fri, May 2, 2025 at 5:59 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> This can be squashed into the previous step.  That is how our \"git\n> pack-redundant\" conversion did.\n>\n> Theoretically, however, those who want to gauge the need to keep the\n> command by exposing their users to patches before this one may want\n> to wait until their experiment finishes before they formally say\n> \"this will go away\".\n>\n> This change is made into a separate patch from the previous step\n> precisely to help those folks.\n\nWere these three paragraphs intended to come after the \"---\" line, but\naccidentally placed in the commit message?\n\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  Documentation/BreakingChanges.adoc | 9 +++++++++\n>  Documentation/git-whatchanged.adoc | 6 ++++++\n>  2 files changed, 15 insertions(+)\n>\n> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\n> index bdfad29d8a..f9026d004c 100644\n> --- a/Documentation/BreakingChanges.adoc\n> +++ b/Documentation/BreakingChanges.adoc\n> @@ -178,6 +178,15 @@ references.\n>  +\n>  These features will be removed.\n>\n> +* The git-whatchanged(1) command has outlived its usefulness more than\n> +  10 years ago, and takes more keystrokes to type than its rough\n> +  equivalent `git log --raw`.  We have nominated the command for\n> +  removal, have changed the command to refuse to work unless the\n> +  `--i-still-use-this` option is given, and asked the users to report\n> +  when they do so.  So far there hasn't been a single complaint.\n> ++\n> +The command will be removed\n\nMissing period at the end of this sentence?\n\n\n> +\n>  == Superseded features that will not be deprecated\n>\n>  Some features have gained newer replacements that aim to improve the design in\n> diff --git a/Documentation/git-whatchanged.adoc b/Documentation/git-whatchanged.adoc\n> index d400b68d4b..d21484026f 100644\n> --- a/Documentation/git-whatchanged.adoc\n> +++ b/Documentation/git-whatchanged.adoc\n> @@ -11,6 +11,12 @@ SYNOPSIS\n>  [synopsis]\n>  git whatchanged <option>...\n>\n> +WARNING\n> +-------\n> +`git whatchanged` has been deprecated and is scheduled for removal in\n> +a future version of Git, as it is merely `git log` with different\n> +default; `whatchanged` is not even shorter to type than `log --raw`.\n> +\n>  DESCRIPTION\n>  -----------\n>\n> --\n> 2.49.0-601-ga5925c3955\n"},{"id":"517894","messageId":"xmqqh61psmmf.fsf@gitster.g","threadId":"63381","inReplyTo":"CABPp-BE3Qh55=6GR7s-Wv2rS9+oAFokw=9R_1WiayLWDMsuAVA@mail.gmail.com","subject":"Re: [PATCH v3 6/6] whatschanged: list it in BreakingChanges document","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T18:35:36Z","receivedAt":"2025-05-12T18:35:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n> On Fri, May 2, 2025 at 5:59 PM Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>> This can be squashed into the previous step.  That is how our \"git\n>> pack-redundant\" conversion did.\n>>\n>> Theoretically, however, those who want to gauge the need to keep the\n>> command by exposing their users to patches before this one may want\n>> to wait until their experiment finishes before they formally say\n>> \"this will go away\".\n>>\n>> This change is made into a separate patch from the previous step\n>> precisely to help those folks.\n>\n> Were these three paragraphs intended to come after the \"---\" line, but\n> accidentally placed in the commit message?\n\nThey are indeed meant above the \"---\" line to explain why this one\nis separate.\n\n>> +* The git-whatchanged(1) command has outlived its usefulness more than\n>> +  10 years ago, and takes more keystrokes to type than its rough\n>> +  equivalent `git log --raw`.  We have nominated the command for\n>> +  removal, have changed the command to refuse to work unless the\n>> +  `--i-still-use-this` option is given, and asked the users to report\n>> +  when they do so.  So far there hasn't been a single complaint.\n>> ++\n>> +The command will be removed\n>\n> Missing period at the end of this sentence?\n\nIndeed.\n\nThanks.\n\n"},{"id":"517901","messageId":"20250512190311.1451556-1-gitster@pobox.com","threadId":"63381","inReplyTo":"20250503005814.3030099-1-gitster@pobox.com","subject":"[PATCH v4 0/6] Nominating \"whatchanged\" for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T19:03:05Z","receivedAt":"2025-05-12T19:03:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"git whatchanged\" has outlived its usefulness when \"git log\" with\nvarious diff-related options more than 10 years ago.  It is not even\nshorter to type than its rough equivalent \"git log --raw\".  It is\nhigh time to start seeing if it is still being used, declare its\nofficial deprecation, and announce its removal in the future.\n\nThis iteration is more complete than the previous two iterations:\n\n * The first step is to refactor the mechanism to show the message\n   to ask users to contact git@vger that they still use the command,\n   out of \"git pack-redundant\" implementation.  This message is\n   shown when the \"--i-still-use-this\" option is not passed to a\n   command that requires it.\n\n * The second and the third step are to remove unnecessary mentions\n   of \"whatchanged\" from our documentation and tests.  With these,\n   we have fewer places that we need to adjust when the command gets\n   truly removed.\n\n * Then we start to require that the \"--i-still-use-this\" option is\n   passed from the command line.  This requires adjustment for tests\n   that protect the behaviour of the command, as they must now pass\n   the required option just like end-users.\n\n * The last two steps are for a future.  In order to make sure that\n   we can cleanly ditch the feature at some future date by removing\n   it from the build, test, and documentation when Git is built with\n   WITH_BREAKING_CHANGES.  And finally we add \"whatchanged\" to the\n   list of features to be removed in the BreakingChanges document.\n\nThis iteration incorporates updated log messages, and a missing\nperiod in the documentation, helped by Elijah.\n\n\nJunio C Hamano (6):\n  you-still-use-that??: help deprecating commands for removal\n  doc: prepare for a world without whatchanged\n  tests: prepare for a world without whatchanged\n  whatchanged: require --i-still-use-this\n  whatchanged: remove when built with WITH_BREAKING_CHANGES\n  whatschanged: list it in BreakingChanges document\n\n Documentation/BreakingChanges.adoc           |  9 ++++++\n Documentation/MyFirstObjectWalk.adoc         |  4 +--\n Documentation/config/format.adoc             |  6 ++++\n Documentation/config/log.adoc                | 11 +++++--\n Documentation/git-whatchanged.adoc           | 10 ++++--\n Documentation/pretty-options.adoc            |  5 +++\n Documentation/rev-list-options.adoc          |  9 ++++--\n Documentation/technical/sparse-checkout.adoc |  2 +-\n Documentation/user-manual.adoc               |  2 +-\n builtin/log.c                                | 19 +++++++++++\n builtin/pack-redundant.c                     | 10 ++----\n git-compat-util.h                            |  2 ++\n git.c                                        |  2 ++\n t/t4013-diff-various.sh                      | 27 ++++++++++++++--\n t/t4202-log.sh                               | 34 ++++++++++++++------\n t/t5323-pack-redundant.sh                    |  5 +++\n t/t9300-fast-import.sh                       | 12 +++----\n t/t9301-fast-import-notes.sh                 |  2 +-\n usage.c                                      | 12 +++++++\n 19 files changed, 146 insertions(+), 37 deletions(-)\n\nRange-diff against v3:\n1:  a43a2ffdab ! 1:  fedbc30d0e you-still-use-that??: help deprecating commands for removal\n    @@ Metadata\n      ## Commit message ##\n         you-still-use-that??: help deprecating commands for removal\n     \n    -    A command slated for removal like \"git pack-redundant\" gains a\n    -    command line option \"--i-still-use-this\", and refuses to work when\n    -    the option is not given.  The message and the instruction upon\n    -    seeing what to do are both rather long, so before letting another\n    -    command to use the same mechanism, factor out the message+die part\n    -    into a small helper function, and use that.\n    +    Commands slated for removal like \"git pack-redundant\" now require\n    +    an explicit \"--i-still-use-this\" option to run.  This is to\n    +    discourage casual use and surface their pending deprecation to\n    +    users.\n     \n    -    The existing pack-redundant test lacked a test to make sure that we\n    -    require the --i-still-use-this option.  Add one while we are at it.\n    +    The warning message is long, so factor it into a helper function\n    +    you_still_use_that() to simplify reuse by other commands.\n    +\n    +    Also add a missing test to ensure this enforcement works for\n    +    \"pack-redundant\".\n     \n         Signed-off-by: Junio C Hamano <gitster@pobox.com>\n     \n2:  16ccf7d92e ! 2:  7a3897acca doc: prepare for a world without whatchanged\n    @@ Metadata\n      ## Commit message ##\n         doc: prepare for a world without whatchanged\n     \n    -    These documents mention \"whatchanged\" as an example, that can be\n    -    substituted by something else.  A new hypothetical command \"walken\"\n    -    would come near \"whatchanged\" but since the latter may be going\n    -    away, we can say it would come near \"version\", as the fictitious\n    -    command sorts between them.  Similarly, we do not have to use\n    -    \"whatchanged\" as an example of a subcommand that is also implemented\n    -    in builtin/log.c file; we can instead mention \"show\".\n    -\n    -    Both of these changes allow us not to worry about adjusting these\n    -    places when \"whatchanged\" is finally removed.\n    +    Some documentation examples reference \"whatchanged\", either as a\n    +    placeholder command or an example of source structure.\n    +\n    +    To reduce the need for future edits when `whatchanged` is removed,\n    +    replace these references with alternatives:\n    +\n    +     - In `MyFirstObjectWalk.adoc`, use `version` as the nearby anchor\n    +       point for `walken`, instead of `whatchanged`.\n    +\n    +     - In `user-manual.adoc`, cite `show` instead of `whatchanged` as\n    +       a command whose source lives in the same file as `log`.\n     \n         Signed-off-by: Junio C Hamano <gitster@pobox.com>\n     \n3:  6951fb8cef ! 3:  f696eed84b tests: prepare for a world without whatchanged\n    @@ Commit message\n         Some tests on fast-import run \"git whatchanged\" without even\n         checking the output from the command.  It is tempting to remove the\n         calls altogether since they are not doing anything useful, but they\n    -    presumably were placed while the tests were developed to manually\n    +    presumably were added there while the tests were developed to manually\n         sanity check which paths were touched.\n     \n         Replace these calls with \"git log --raw\", which is a rough\n4:  2775f628c3 = 4:  01d4ed9acd whatchanged: require --i-still-use-this\n5:  b3d4d1f46a = 5:  a7aca55d5d whatchanged: remove when built with WITH_BREAKING_CHANGES\n6:  7c89054731 ! 6:  9d60f38d2f whatschanged: list it in BreakingChanges document\n    @@ Documentation/BreakingChanges.adoc: references.\n     +  `--i-still-use-this` option is given, and asked the users to report\n     +  when they do so.  So far there hasn't been a single complaint.\n     ++\n    -+The command will be removed\n    ++The command will be removed.\n     +\n      == Superseded features that will not be deprecated\n      \n-- \n2.49.0-674-gc1e4f99c0b\n\n"},{"id":"517902","messageId":"20250512190311.1451556-2-gitster@pobox.com","threadId":"63381","inReplyTo":"20250512190311.1451556-1-gitster@pobox.com","subject":"[PATCH v4 1/6] you-still-use-that??: help deprecating commands for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T19:03:06Z","receivedAt":"2025-05-12T19:03:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Commands slated for removal like \"git pack-redundant\" now require\nan explicit \"--i-still-use-this\" option to run.  This is to\ndiscourage casual use and surface their pending deprecation to\nusers.\n\nThe warning message is long, so factor it into a helper function\nyou_still_use_that() to simplify reuse by other commands.\n\nAlso add a missing test to ensure this enforcement works for\n\"pack-redundant\".\n\nHelped-by: Elijah Newren <newren@gmail.com>\n[en: log message]\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/pack-redundant.c  | 10 ++--------\n git-compat-util.h         |  2 ++\n t/t5323-pack-redundant.sh |  5 +++++\n usage.c                   | 12 ++++++++++++\n 4 files changed, 21 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c\nindex 3febe732f8..6dc9e020c7 100644\n--- a/builtin/pack-redundant.c\n+++ b/builtin/pack-redundant.c\n@@ -625,14 +625,8 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s\n \t\t\tbreak;\n \t}\n \n-\tif (!i_still_use_this) {\n-\t\tfputs(_(\"'git pack-redundant' is nominated for removal.\\n\"\n-\t\t\t\"If you still use this command, please add an extra\\n\"\n-\t\t\t\"option, '--i-still-use-this', on the command line\\n\"\n-\t\t\t\"and let us know you still use it by sending an e-mail\\n\"\n-\t\t\t\"to <git@vger.kernel.org>.  Thanks.\\n\"), stderr);\n-\t\tdie(_(\"refusing to run without --i-still-use-this\"));\n-\t}\n+\tif (!i_still_use_this)\n+\t\tyou_still_use_that(\"git pack-redundant\");\n \n \tif (load_all_packs)\n \t\tload_all();\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex e123288e8f..21cab99567 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -703,6 +703,8 @@ void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));\n \n void show_usage_if_asked(int ac, const char **av, const char *err);\n \n+NORETURN void you_still_use_that(const char *command_name);\n+\n #ifndef NO_OPENSSL\n #ifdef APPLE_COMMON_CRYPTO\n #include \"compat/apple-common-crypto.h\"\ndiff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh\nindex 688cd9706c..f2f20cfa40 100755\n--- a/t/t5323-pack-redundant.sh\n+++ b/t/t5323-pack-redundant.sh\n@@ -45,6 +45,11 @@ fi\n main_repo=main.git\n shared_repo=shared.git\n \n+test_expect_success 'pack-redundant needs --i-still-use-this' '\n+\ttest_must_fail git pack-redundant >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n git_pack_redundant='git pack-redundant --i-still-use-this'\n \n # Create commits in <repo> and assign each commit's oid to shell variables\ndiff --git a/usage.c b/usage.c\nindex 38b46bbbfe..4aaad2b553 100644\n--- a/usage.c\n+++ b/usage.c\n@@ -372,3 +372,15 @@ void bug_fl(const char *file, int line, const char *fmt, ...)\n \ttrace2_cmd_error_va(fmt, ap);\n \tva_end(ap);\n }\n+\n+NORETURN void you_still_use_that(const char *command_name)\n+{\n+\tfprintf(stderr,\n+\t\t_(\"'%s' is nominated for removal.\\n\"\n+\t\t  \"If you still use this command, please add an extra\\n\"\n+\t\t  \"option, '--i-still-use-this', on the command line\\n\"\n+\t\t  \"and let us know you still use it by sending an e-mail\\n\"\n+\t\t  \"to <git@vger.kernel.org>.  Thanks.\\n\"),\n+\t\tcommand_name);\n+\tdie(_(\"refusing to run without --i-still-use-this\"));\n+}\n-- \n2.49.0-674-gc1e4f99c0b\n\n"},{"id":"517903","messageId":"20250512190311.1451556-3-gitster@pobox.com","threadId":"63381","inReplyTo":"20250512190311.1451556-1-gitster@pobox.com","subject":"[PATCH v4 2/6] doc: prepare for a world without whatchanged","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T19:03:07Z","receivedAt":"2025-05-12T19:03:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Some documentation examples reference \"whatchanged\", either as a\nplaceholder command or an example of source structure.\n\nTo reduce the need for future edits when `whatchanged` is removed,\nreplace these references with alternatives:\n\n - In `MyFirstObjectWalk.adoc`, use `version` as the nearby anchor\n   point for `walken`, instead of `whatchanged`.\n\n - In `user-manual.adoc`, cite `show` instead of `whatchanged` as\n   a command whose source lives in the same file as `log`.\n\nHelped-by: Elijah Newren <newren@gmail.com>\n[en: log message]\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/MyFirstObjectWalk.adoc | 4 ++--\n Documentation/user-manual.adoc       | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/MyFirstObjectWalk.adoc b/Documentation/MyFirstObjectWalk.adoc\nindex d6e9dfdbbe..102a465a48 100644\n--- a/Documentation/MyFirstObjectWalk.adoc\n+++ b/Documentation/MyFirstObjectWalk.adoc\n@@ -83,13 +83,13 @@ int cmd_walken(int argc, const char **argv, const char *prefix)\n }\n ----\n \n-Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:\n+Also add the relevant line in `builtin.h` near `cmd_version()`:\n \n ----\n int cmd_walken(int argc, const char **argv, const char *prefix);\n ----\n \n-Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,\n+Include the command in `git.c` in `commands[]` near the entry for `version`,\n maintaining alphabetical ordering:\n \n ----\ndiff --git a/Documentation/user-manual.adoc b/Documentation/user-manual.adoc\nindex d2b478ad23..7124345966 100644\n--- a/Documentation/user-manual.adoc\n+++ b/Documentation/user-manual.adoc\n@@ -4240,7 +4240,7 @@ command `git`.  The source side of a builtin is\n - an entry in `BUILTIN_OBJECTS` in the `Makefile`.\n \n Sometimes, more than one builtin is contained in one source file.  For\n-example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin/log.c`,\n+example, `cmd_show()` and `cmd_log()` both reside in `builtin/log.c`,\n since they share quite a bit of code.  In that case, the commands which are\n _not_ named like the `.c` file in which they live have to be listed in\n `BUILT_INS` in the `Makefile`.\n-- \n2.49.0-674-gc1e4f99c0b\n\n"},{"id":"517904","messageId":"20250512190311.1451556-4-gitster@pobox.com","threadId":"63381","inReplyTo":"20250512190311.1451556-1-gitster@pobox.com","subject":"[PATCH v4 3/6] tests: prepare for a world without whatchanged","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T19:03:08Z","receivedAt":"2025-05-12T19:03:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Some tests on fast-import run \"git whatchanged\" without even\nchecking the output from the command.  It is tempting to remove the\ncalls altogether since they are not doing anything useful, but they\npresumably were added there while the tests were developed to manually\nsanity check which paths were touched.\n\nReplace these calls with \"git log --raw\", which is a rough\nequivalent in the more modern Git.\n\nThis does not remove \"git whatchanged\", but we no longer have to\nworry about adjusting these places when we eventually do.\n\nHelped-by: Elijah Newren <newren@gmail.com>\n[en: log message]\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t9300-fast-import.sh       | 12 ++++++------\n t/t9301-fast-import-notes.sh |  2 +-\n 2 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex b258dbf1df..4dc3d645bf 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -120,7 +120,7 @@ test_expect_success 'A: create pack from stdin' '\n \n \tINPUT_END\n \tgit fast-import --export-marks=marks.out <input &&\n-\tgit whatchanged main\n+\tgit log --raw main\n '\n \n test_expect_success 'A: verify pack' '\n@@ -279,7 +279,7 @@ test_expect_success 'A: verify marks import does not crash' '\n \tINPUT_END\n \n \tgit fast-import --import-marks=marks.out <input &&\n-\tgit whatchanged verify--import-marks\n+\tgit log --raw verify--import-marks\n '\n \n test_expect_success 'A: verify pack' '\n@@ -652,7 +652,7 @@ test_expect_success 'C: incremental import create pack from stdin' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged branch\n+\tgit log --raw branch\n '\n \n test_expect_success 'C: verify pack' '\n@@ -715,7 +715,7 @@ test_expect_success 'D: inline data in commit' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged branch\n+\tgit log --raw branch\n '\n \n test_expect_success 'D: verify pack' '\n@@ -882,7 +882,7 @@ test_expect_success 'H: deletall, add 1' '\n \n \tINPUT_END\n \tgit fast-import <input &&\n-\tgit whatchanged H\n+\tgit log --raw H\n '\n \n test_expect_success 'H: verify pack' '\n@@ -2066,7 +2066,7 @@ test_expect_success 'Q: commit notes' '\n \tINPUT_END\n \n \tgit fast-import <input &&\n-\tgit whatchanged notes-test\n+\tgit log --raw notes-test\n '\n \n test_expect_success 'Q: verify pack' '\ndiff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh\nindex 1ae4d7c0d3..e62173cf1f 100755\n--- a/t/t9301-fast-import-notes.sh\n+++ b/t/t9301-fast-import-notes.sh\n@@ -76,7 +76,7 @@ INPUT_END\n test_expect_success 'set up main branch' '\n \n \tgit fast-import <input &&\n-\tgit whatchanged main\n+\tgit log --raw main\n '\n \n commit4=$(git rev-parse refs/heads/main)\n-- \n2.49.0-674-gc1e4f99c0b\n\n"},{"id":"517905","messageId":"20250512190311.1451556-5-gitster@pobox.com","threadId":"63381","inReplyTo":"20250512190311.1451556-1-gitster@pobox.com","subject":"[PATCH v4 4/6] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T19:03:09Z","receivedAt":"2025-05-12T19:03:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The documentation of \"git whatchanged\" is pretty explicit that this\nhas retained for historical reasons to help those whose fingers\ncannot be retrained.  Let's see if they still are finding it hard to\ntype \"git log --raw\" instead of \"git whatchanged\" by marking the\ncommand as \"nominated for removal\", and require \"--i-still-use-this\"\non the command line.  Adjust the tests so that the option is passed\nwhen we invoke the command.  In addition, we test that the command\nfails when \"--i-still-use-this\" is not given.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/log.c           | 13 +++++++++++++\n t/t4013-diff-various.sh | 17 +++++++++++++++--\n t/t4202-log.sh          | 14 +++++++++-----\n 3 files changed, 37 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 04a6ef97bc..0f98ac8a34 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -113,6 +113,13 @@ struct log_config {\n \tint fmt_patch_name_max;\n \tchar *fmt_pretty;\n \tchar *default_date_mode;\n+\n+\t/*\n+\t * Note: git_log_config() does not touch this member and that\n+\t * is very deliberate.  This member is only to be used to\n+\t * resurrect whatchanged that is deprecated.\n+\t */\n+\tint i_still_use_this;\n };\n \n static void log_config_init(struct log_config *cfg)\n@@ -267,6 +274,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tOPT__QUIET(&quiet, N_(\"suppress diff output\")),\n \t\tOPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n \t\tOPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"use mail map file\")),\n+\t\tOPT_HIDDEN_BOOL(0, \"i-still-use-this\", &cfg->i_still_use_this,\n+\t\t\t\t\"<use this deprecated command>\"),\n \t\tOPT_ALIAS(0, \"mailmap\", \"use-mailmap\"),\n \t\tOPT_CALLBACK_F(0, \"clear-decorations\", NULL, NULL,\n \t\t\t       N_(\"clear all previously-defined decoration filters\"),\n@@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,\n \topt.def = \"HEAD\";\n \topt.revarg_opt = REVARG_COMMITTISH;\n \tcmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);\n+\n+\tif (!cfg.i_still_use_this)\n+\t\tyou_still_use_that(\"git whatchanged\");\n+\n \tif (!rev.diffopt.output_format)\n \t\trev.diffopt.output_format = DIFF_FORMAT_RAW;\n \ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 3855d68dbc..8caab2ee38 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -203,11 +203,19 @@ do\n \ttest_expect_success \"git $cmd # magic is ${magic:-(not used)}\" '\n \t\t{\n \t\t\techo \"$ git $cmd\"\n+\n+\t\t\tcase \"$cmd\" in\n+\t\t\twhatchanged | whatchanged\" \"*)\n+\t\t\t\trun=\"whatchanged --i-still-use-this\"\n+\t\t\t\trun=\"$run ${cmd#whatchanged}\" ;;\n+\t\t\t*)\n+\t\t\t\trun=$cmd ;;\n+\t\t\tesac &&\n \t\t\tcase \"$magic\" in\n \t\t\t\"\")\n-\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;\n+\t\t\t\tGIT_PRINT_SHA1_ELLIPSIS=yes git $run ;;\n \t\t\tnoellipses)\n-\t\t\t\tgit $cmd ;;\n+\t\t\t\tgit $run ;;\n \t\t\tesac |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n \t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n@@ -454,6 +462,11 @@ diff-tree --stat --compact-summary initial mode\n diff-tree -R --stat --compact-summary initial mode\n EOF\n \n+test_expect_success 'whatchanged needs --i-still-use-this' '\n+\ttest_must_fail git whatchanged >message 2>&1 &&\n+\ttest_grep \"nominated for removal\" message\n+'\n+\n test_expect_success 'log -m matches pure log' '\n \tgit log master >result &&\n \tprocess_diffs result >expected &&\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 51f7beb59f..ce4c7ab2af 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -490,6 +490,7 @@ for cmd in show whatchanged reflog format-patch\n do\n \tcase \"$cmd\" in\n \tformat-patch) myarg=\"HEAD~..\" ;;\n+\twhatchanged) myarg=--i-still-use-this ;;\n \t*) myarg= ;;\n \tesac\n \n@@ -1202,19 +1203,22 @@ test_expect_success 'reflog is expected format' '\n '\n \n test_expect_success 'whatchanged is expected format' '\n+\twhatchanged=\"whatchanged --i-still-use-this\" &&\n \tgit log --no-merges --raw >expect &&\n-\tgit whatchanged >actual &&\n+\tgit $whatchanged >actual &&\n \ttest_cmp expect actual\n '\n \n test_expect_success 'log.abbrevCommit configuration' '\n+\twhatchanged=\"whatchanged --i-still-use-this\" &&\n+\n \tgit log --abbrev-commit >expect.log.abbrev &&\n \tgit log --no-abbrev-commit >expect.log.full &&\n \tgit log --pretty=raw >expect.log.raw &&\n \tgit reflog --abbrev-commit >expect.reflog.abbrev &&\n \tgit reflog --no-abbrev-commit >expect.reflog.full &&\n-\tgit whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n-\tgit whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n+\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n+\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n \n \ttest_config log.abbrevCommit true &&\n \n@@ -1231,9 +1235,9 @@ test_expect_success 'log.abbrevCommit configuration' '\n \tgit reflog --no-abbrev-commit >actual &&\n \ttest_cmp expect.reflog.full actual &&\n \n-\tgit whatchanged >actual &&\n+\tgit $whatchanged >actual &&\n \ttest_cmp expect.whatchanged.abbrev actual &&\n-\tgit whatchanged --no-abbrev-commit >actual &&\n+\tgit $whatchanged --no-abbrev-commit >actual &&\n \ttest_cmp expect.whatchanged.full actual\n '\n \n-- \n2.49.0-674-gc1e4f99c0b\n\n"},{"id":"517906","messageId":"20250512190311.1451556-6-gitster@pobox.com","threadId":"63381","inReplyTo":"20250512190311.1451556-1-gitster@pobox.com","subject":"[PATCH v4 5/6] whatchanged: remove when built with WITH_BREAKING_CHANGES","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T19:03:10Z","receivedAt":"2025-05-12T19:03:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"As we made \"git whatchanged\" require \"--i-still-use-this\" and asked\nthe users to report if they still want to use it, the logical next\nstep is to allow us build Git without \"whatchanged\" to prepare for\nits eventual removal.\n\nIf we were to follow the pattern established in 8ccc75c2 (remote:\nannounce removal of \"branches/\" and \"remotes/\", 2025-01-22), we can\ndo this together with the documentation update to officially list\nthat the command will be removed in the BreakingChanges document,\nbut let's just keep the changes separate just in case we want to\nproceed a bit slower.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config/format.adoc             |  6 +++++\n Documentation/config/log.adoc                | 11 ++++++--\n Documentation/pretty-options.adoc            |  5 ++++\n Documentation/rev-list-options.adoc          |  9 +++++--\n Documentation/technical/sparse-checkout.adoc |  2 +-\n builtin/log.c                                |  6 +++++\n git.c                                        |  2 ++\n t/t4013-diff-various.sh                      | 12 +++++++--\n t/t4202-log.sh                               | 28 ++++++++++++++------\n 9 files changed, 66 insertions(+), 15 deletions(-)\n\ndiff --git a/Documentation/config/format.adoc b/Documentation/config/format.adoc\nindex 7410e930e5..ab0710e86a 100644\n--- a/Documentation/config/format.adoc\n+++ b/Documentation/config/format.adoc\n@@ -68,9 +68,15 @@ format.encodeEmailHeaders::\n \tDefaults to true.\n \n format.pretty::\n+ifndef::with-breaking-changes[]\n \tThe default pretty format for log/show/whatchanged command.\n \tSee linkgit:git-log[1], linkgit:git-show[1],\n \tlinkgit:git-whatchanged[1].\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+\tThe default pretty format for log/show command.\n+\tSee linkgit:git-log[1], linkgit:git-show[1].\n+endif::with-breaking-changes[]\n \n format.thread::\n \tThe default threading style for 'git format-patch'.  Can be\ndiff --git a/Documentation/config/log.adoc b/Documentation/config/log.adoc\nindex 9003a82191..a9b160e7de 100644\n--- a/Documentation/config/log.adoc\n+++ b/Documentation/config/log.adoc\n@@ -1,6 +1,13 @@\n log.abbrevCommit::\n-\tIf true, makes linkgit:git-log[1], linkgit:git-show[1], and\n-\tlinkgit:git-whatchanged[1] assume `--abbrev-commit`. You may\n+\tIf true, makes\n+ifndef::with-breaking-changes[]\n+\tlinkgit:git-log[1], linkgit:git-show[1], and\n+\tlinkgit:git-whatchanged[1]\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+\tlinkgit:git-log[1] and linkgit:git-show[1]\n+endif::with-breaking-changes[]\n+\tassume `--abbrev-commit`. You may\n \toverride this option with `--no-abbrev-commit`.\n \n log.date::\ndiff --git a/Documentation/pretty-options.adoc b/Documentation/pretty-options.adoc\nindex 23888cd612..b36e96abe2 100644\n--- a/Documentation/pretty-options.adoc\n+++ b/Documentation/pretty-options.adoc\n@@ -62,7 +62,12 @@ ifndef::git-rev-list[]\n --notes[=<ref>]::\n \tShow the notes (see linkgit:git-notes[1]) that annotate the\n \tcommit, when showing the commit log message.  This is the default\n+ifndef::with-breaking-changes[]\n \tfor `git log`, `git show` and `git whatchanged` commands when\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+\tfor `git log` and `git show` commands when\n+endif::with-breaking-changes[]\n \tthere is no `--pretty`, `--format`, or `--oneline` option given\n \ton the command line.\n +\ndiff --git a/Documentation/rev-list-options.adoc b/Documentation/rev-list-options.adoc\nindex 785c0786e0..ee5c5c9489 100644\n--- a/Documentation/rev-list-options.adoc\n+++ b/Documentation/rev-list-options.adoc\n@@ -1074,8 +1074,13 @@ Commit Formatting\n \n ifdef::git-rev-list[]\n Using these options, linkgit:git-rev-list[1] will act similar to the\n-more specialized family of commit log tools: linkgit:git-log[1],\n-linkgit:git-show[1], and linkgit:git-whatchanged[1]\n+more specialized family of commit log tools:\n+ifndef::with-breaking-changes[]\n+linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1].\n+endif::with-breaking-changes[]\n+ifdef::with-breaking-changes[]\n+linkgit:git-log[1] and linkgit:git-show[1].\n+endif::with-breaking-changes[]\n endif::git-rev-list[]\n \n include::pretty-options.adoc[]\ndiff --git a/Documentation/technical/sparse-checkout.adoc b/Documentation/technical/sparse-checkout.adoc\nindex d968659354..67134bb768 100644\n--- a/Documentation/technical/sparse-checkout.adoc\n+++ b/Documentation/technical/sparse-checkout.adoc\n@@ -442,7 +442,7 @@ understanding these differences can be beneficial.\n       * blame (only matters when one or more -C flags are passed)\n \t* and annotate\n       * log\n-      * whatchanged\n+      * whatchanged (may not exist anymore)\n       * ls-files\n       * diff-index\n       * diff-tree\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 0f98ac8a34..1d0ae645ab 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -114,12 +114,14 @@ struct log_config {\n \tchar *fmt_pretty;\n \tchar *default_date_mode;\n \n+#ifndef WITH_BREAKING_CHANGES\n \t/*\n \t * Note: git_log_config() does not touch this member and that\n \t * is very deliberate.  This member is only to be used to\n \t * resurrect whatchanged that is deprecated.\n \t */\n \tint i_still_use_this;\n+#endif\n };\n \n static void log_config_init(struct log_config *cfg)\n@@ -274,8 +276,10 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,\n \t\tOPT__QUIET(&quiet, N_(\"suppress diff output\")),\n \t\tOPT_BOOL(0, \"source\", &source, N_(\"show source\")),\n \t\tOPT_BOOL(0, \"use-mailmap\", &mailmap, N_(\"use mail map file\")),\n+#ifndef WITH_BREAKING_CHANGES\n \t\tOPT_HIDDEN_BOOL(0, \"i-still-use-this\", &cfg->i_still_use_this,\n \t\t\t\t\"<use this deprecated command>\"),\n+#endif\n \t\tOPT_ALIAS(0, \"mailmap\", \"use-mailmap\"),\n \t\tOPT_CALLBACK_F(0, \"clear-decorations\", NULL, NULL,\n \t\t\t       N_(\"clear all previously-defined decoration filters\"),\n@@ -642,6 +646,7 @@ static int git_log_config(const char *var, const char *value,\n \treturn git_diff_ui_config(var, value, ctx, cb);\n }\n \n+#ifndef WITH_BREAKING_CHANGES\n int cmd_whatchanged(int argc,\n \t\t    const char **argv,\n \t\t    const char *prefix,\n@@ -678,6 +683,7 @@ int cmd_whatchanged(int argc,\n \tlog_config_release(&cfg);\n \treturn ret;\n }\n+#endif\n \n static void show_tagger(const char *buf, struct rev_info *rev)\n {\ndiff --git a/git.c b/git.c\nindex 450d6aaa86..b84db92cb5 100644\n--- a/git.c\n+++ b/git.c\n@@ -645,7 +645,9 @@ static struct cmd_struct commands[] = {\n \t{ \"verify-pack\", cmd_verify_pack },\n \t{ \"verify-tag\", cmd_verify_tag, RUN_SETUP },\n \t{ \"version\", cmd_version },\n+#ifndef WITH_BREAKING_CHANGES\n \t{ \"whatchanged\", cmd_whatchanged, RUN_SETUP },\n+#endif\n \t{ \"worktree\", cmd_worktree, RUN_SETUP },\n \t{ \"write-tree\", cmd_write_tree, RUN_SETUP },\n };\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 8caab2ee38..8e38df1685 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -200,7 +200,15 @@ do\n \texpect=\"$TEST_DIRECTORY/t4013/diff.$test\"\n \tactual=\"$pfx-diff.$test\"\n \n-\ttest_expect_success \"git $cmd # magic is ${magic:-(not used)}\" '\n+\tcase \"$cmd\" in\n+\twhatchanged | whatchanged\" \"*)\n+\t\tprereq=WITHOUT_BREAKING_CHANGES\n+\t\t;;\n+\t*)\n+\t\tprereq=;;\n+\tesac\n+\n+\ttest_expect_success $prereq \"git $cmd # magic is ${magic:-(not used)}\" '\n \t\t{\n \t\t\techo \"$ git $cmd\"\n \n@@ -462,7 +470,7 @@ diff-tree --stat --compact-summary initial mode\n diff-tree -R --stat --compact-summary initial mode\n EOF\n \n-test_expect_success 'whatchanged needs --i-still-use-this' '\n+test_expect_success WITHOUT_BREAKING_CHANGES 'whatchanged needs --i-still-use-this' '\n \ttest_must_fail git whatchanged >message 2>&1 &&\n \ttest_grep \"nominated for removal\" message\n '\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex ce4c7ab2af..ad05f6772f 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -486,7 +486,12 @@ test_expect_success !FAIL_PREREQS 'log with various grep.patternType configurati\n \t)\n '\n \n-for cmd in show whatchanged reflog format-patch\n+cmds=\"show reflog format-patch\"\n+if test_have_prereq WITHOUT_BREAKING_CHANGES\n+then\n+\tcmds=\"$cmds whatchanged\"\n+fi\n+for cmd in $cmds\n do\n \tcase \"$cmd\" in\n \tformat-patch) myarg=\"HEAD~..\" ;;\n@@ -1202,7 +1207,7 @@ test_expect_success 'reflog is expected format' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'whatchanged is expected format' '\n+test_expect_success WITHOUT_BREAKING_CHANGES 'whatchanged is expected format' '\n \twhatchanged=\"whatchanged --i-still-use-this\" &&\n \tgit log --no-merges --raw >expect &&\n \tgit $whatchanged >actual &&\n@@ -1217,8 +1222,12 @@ test_expect_success 'log.abbrevCommit configuration' '\n \tgit log --pretty=raw >expect.log.raw &&\n \tgit reflog --abbrev-commit >expect.reflog.abbrev &&\n \tgit reflog --no-abbrev-commit >expect.reflog.full &&\n-\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n-\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n+\n+\tif test_have_prereq WITHOUT_BREAKING_CHANGES\n+\tthen\n+\t\tgit $whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n+\t\tgit $whatchanged --no-abbrev-commit >expect.whatchanged.full\n+\tfi &&\n \n \ttest_config log.abbrevCommit true &&\n \n@@ -1235,10 +1244,13 @@ test_expect_success 'log.abbrevCommit configuration' '\n \tgit reflog --no-abbrev-commit >actual &&\n \ttest_cmp expect.reflog.full actual &&\n \n-\tgit $whatchanged >actual &&\n-\ttest_cmp expect.whatchanged.abbrev actual &&\n-\tgit $whatchanged --no-abbrev-commit >actual &&\n-\ttest_cmp expect.whatchanged.full actual\n+\tif test_have_prereq WITHOUT_BREAKING_CHANGES\n+\tthen\n+\t\tgit $whatchanged >actual &&\n+\t\ttest_cmp expect.whatchanged.abbrev actual &&\n+\t\tgit $whatchanged --no-abbrev-commit >actual &&\n+\t\ttest_cmp expect.whatchanged.full actual\n+\tfi\n '\n \n test_expect_success '--abbrev-commit with core.abbrev=false' '\n-- \n2.49.0-674-gc1e4f99c0b\n\n"},{"id":"517907","messageId":"20250512190311.1451556-7-gitster@pobox.com","threadId":"63381","inReplyTo":"20250512190311.1451556-1-gitster@pobox.com","subject":"[PATCH v4 6/6] whatschanged: list it in BreakingChanges document","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T19:03:11Z","receivedAt":"2025-05-12T19:03:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This can be squashed into the previous step.  That is how our \"git\npack-redundant\" conversion did.\n\nTheoretically, however, those who want to gauge the need to keep the\ncommand by exposing their users to patches before this one may want\nto wait until their experiment finishes before they formally say\n\"this will go away\".\n\nThis change is made into a separate patch from the previous step\nprecisely to help those folks.\n\nWhile at it, update the documentation page to use the new [synopsis]\nfacility to mark-up the SYNOPSIS part.\n\nHelped-by: Elijah Newren <newren@gmail.com>\n[en: typofix]\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/BreakingChanges.adoc |  9 +++++++++\n Documentation/git-whatchanged.adoc | 10 ++++++++--\n 2 files changed, 17 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc\nindex bdfad29d8a..ac9a84c17b 100644\n--- a/Documentation/BreakingChanges.adoc\n+++ b/Documentation/BreakingChanges.adoc\n@@ -178,6 +178,15 @@ references.\n +\n These features will be removed.\n \n+* The git-whatchanged(1) command has outlived its usefulness more than\n+  10 years ago, and takes more keystrokes to type than its rough\n+  equivalent `git log --raw`.  We have nominated the command for\n+  removal, have changed the command to refuse to work unless the\n+  `--i-still-use-this` option is given, and asked the users to report\n+  when they do so.  So far there hasn't been a single complaint.\n++\n+The command will be removed.\n+\n == Superseded features that will not be deprecated\n \n Some features have gained newer replacements that aim to improve the design in\ndiff --git a/Documentation/git-whatchanged.adoc b/Documentation/git-whatchanged.adoc\nindex 8e55e0bb1e..d21484026f 100644\n--- a/Documentation/git-whatchanged.adoc\n+++ b/Documentation/git-whatchanged.adoc\n@@ -8,8 +8,14 @@ git-whatchanged - Show logs with differences each commit introduces\n \n SYNOPSIS\n --------\n-[verse]\n-'git whatchanged' <option>...\n+[synopsis]\n+git whatchanged <option>...\n+\n+WARNING\n+-------\n+`git whatchanged` has been deprecated and is scheduled for removal in\n+a future version of Git, as it is merely `git log` with different\n+default; `whatchanged` is not even shorter to type than `log --raw`.\n \n DESCRIPTION\n -----------\n-- \n2.49.0-674-gc1e4f99c0b\n\n"},{"id":"517912","messageId":"CABPp-BGUAyRWsnRc+rrsBfPg4hzAoKPMBiD0aH4jxwdO4mEk0w@mail.gmail.com","threadId":"63381","inReplyTo":"20250512190311.1451556-1-gitster@pobox.com","subject":"Re: [PATCH v4 0/6] Nominating \"whatchanged\" for removal","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2025-05-12T21:21:33Z","receivedAt":"2025-05-12T21:21:45Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Mon, May 12, 2025 at 12:04 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"git whatchanged\" has outlived its usefulness when \"git log\" with\n> various diff-related options more than 10 years ago.  It is not even\n> shorter to type than its rough equivalent \"git log --raw\".  It is\n> high time to start seeing if it is still being used, declare its\n> official deprecation, and announce its removal in the future.\n>\n> This iteration is more complete than the previous two iterations:\n>\n>  * The first step is to refactor the mechanism to show the message\n>    to ask users to contact git@vger that they still use the command,\n>    out of \"git pack-redundant\" implementation.  This message is\n>    shown when the \"--i-still-use-this\" option is not passed to a\n>    command that requires it.\n>\n>  * The second and the third step are to remove unnecessary mentions\n>    of \"whatchanged\" from our documentation and tests.  With these,\n>    we have fewer places that we need to adjust when the command gets\n>    truly removed.\n>\n>  * Then we start to require that the \"--i-still-use-this\" option is\n>    passed from the command line.  This requires adjustment for tests\n>    that protect the behaviour of the command, as they must now pass\n>    the required option just like end-users.\n>\n>  * The last two steps are for a future.  In order to make sure that\n>    we can cleanly ditch the feature at some future date by removing\n>    it from the build, test, and documentation when Git is built with\n>    WITH_BREAKING_CHANGES.  And finally we add \"whatchanged\" to the\n>    list of features to be removed in the BreakingChanges document.\n>\n> This iteration incorporates updated log messages, and a missing\n> period in the documentation, helped by Elijah.\n>\n>\n> Junio C Hamano (6):\n>   you-still-use-that??: help deprecating commands for removal\n>   doc: prepare for a world without whatchanged\n>   tests: prepare for a world without whatchanged\n>   whatchanged: require --i-still-use-this\n>   whatchanged: remove when built with WITH_BREAKING_CHANGES\n>   whatschanged: list it in BreakingChanges document\n>\n>  Documentation/BreakingChanges.adoc           |  9 ++++++\n>  Documentation/MyFirstObjectWalk.adoc         |  4 +--\n>  Documentation/config/format.adoc             |  6 ++++\n>  Documentation/config/log.adoc                | 11 +++++--\n>  Documentation/git-whatchanged.adoc           | 10 ++++--\n>  Documentation/pretty-options.adoc            |  5 +++\n>  Documentation/rev-list-options.adoc          |  9 ++++--\n>  Documentation/technical/sparse-checkout.adoc |  2 +-\n>  Documentation/user-manual.adoc               |  2 +-\n>  builtin/log.c                                | 19 +++++++++++\n>  builtin/pack-redundant.c                     | 10 ++----\n>  git-compat-util.h                            |  2 ++\n>  git.c                                        |  2 ++\n>  t/t4013-diff-various.sh                      | 27 ++++++++++++++--\n>  t/t4202-log.sh                               | 34 ++++++++++++++------\n>  t/t5323-pack-redundant.sh                    |  5 +++\n>  t/t9300-fast-import.sh                       | 12 +++----\n>  t/t9301-fast-import-notes.sh                 |  2 +-\n>  usage.c                                      | 12 +++++++\n>  19 files changed, 146 insertions(+), 37 deletions(-)\n>\n> Range-diff against v3:\n\nThe updates to patches 1-3 and patch 6 all look good, but...\n\n> 4:  2775f628c3 = 4:  01d4ed9acd whatchanged: require --i-still-use-this\n> 5:  b3d4d1f46a = 5:  a7aca55d5d whatchanged: remove when built with WITH_BREAKING_CHANGES\n\n...I was surprised to see no changes to either patches 4 or 5.  While\nI didn't comment on those patches myself, Patrick did (and since he\nalready called out the missing word I also noticed, I just didn't call\nit out again).\n"},{"id":"517915","messageId":"xmqqbjrxjvt1.fsf@gitster.g","threadId":"63381","inReplyTo":"CABPp-BGUAyRWsnRc+rrsBfPg4hzAoKPMBiD0aH4jxwdO4mEk0w@mail.gmail.com","subject":"Re: [PATCH v4 0/6] Nominating \"whatchanged\" for removal","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-12T22:42:02Z","receivedAt":"2025-05-12T22:42:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n> The updates to patches 1-3 and patch 6 all look good, but...\n>\n>> 4:  2775f628c3 = 4:  01d4ed9acd whatchanged: require --i-still-use-this\n>> 5:  b3d4d1f46a = 5:  a7aca55d5d whatchanged: remove when built with WITH_BREAKING_CHANGES\n>\n> ...I was surprised to see no changes to either patches 4 or 5.  While\n> I didn't comment on those patches myself, Patrick did (and since he\n> already called out the missing word I also noticed, I just didn't call\n> it out again).\n\nThe meson stuff did not exist in the codebase the topic was based\non, so it won't be squashed into any of these individual patches,\nbut if you take a look at\n\n    $ git show seen^{/^Merge.branch..jc/you-still}\n\nusing any of the recent tip of 'seen', you'll see these changes\napplied as an evil merge to adjust the topic to an updated meson\nmachinery in the more recent codebase.\n\nFor other changes, \"developped\" was already fixed, but \"the command\nwas retained\" was missed, so I'll locally amend.\n\nThanks.\n\n\n"},{"id":"518037","messageId":"xmqq1psrcnwv.fsf@gitster.g","threadId":"63381","inReplyTo":"20250512190311.1451556-5-gitster@pobox.com","subject":"Re: [PATCH v4 4/6] whatchanged: require --i-still-use-this","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-05-14T13:38:56Z","receivedAt":"2025-05-14T13:38:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> The documentation of \"git whatchanged\" is pretty explicit that this\n> has retained for historical reasons to help those whose fingers\n\nIn 731a2c7d (whatchanged: require --i-still-use-this, 2025-05-12),\nthe above has been rephrased to\n\n    The documentation of \"git whatchanged\" is pretty explicit that the\n    command was retained for historical reasons to help those whose fingers\n\nI won't repost the whole series, though.\n\nThanks.\n\n"}]}