Merge branch 'jc/you-still-use-that' into jch

The instructions for deprecated commands emitted by
you_still_use_that() have been reworded to clarify that the removal
decision is final and to provide more assertive guidance on finding
a replacement.

* jc/you-still-use-that:
  you_still_use_that(): reword the instructions
jch
Junio C Hamano 2026-08-31 11:11:59 -07:00
commit 2fef32078b
3 changed files with 9 additions and 11 deletions

View File

@ -478,7 +478,7 @@ EOF


test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this' ' test_expect_success !WITH_BREAKING_CHANGES 'whatchanged needs --i-still-use-this' '
test_must_fail git whatchanged >message 2>&1 && test_must_fail git whatchanged >message 2>&1 &&
test_grep "nominated for removal" message test_grep "will be removed soon" message
' '


test_expect_success 'log -m matches pure log' ' test_expect_success 'log -m matches pure log' '

View File

@ -47,7 +47,7 @@ shared_repo=shared.git


test_expect_success 'pack-redundant needs --i-still-use-this' ' test_expect_success 'pack-redundant needs --i-still-use-this' '
test_must_fail git pack-redundant >message 2>&1 && test_must_fail git pack-redundant >message 2>&1 &&
test_grep "nominated for removal" message test_grep "will be removed soon" message
' '


git_pack_redundant='git pack-redundant --i-still-use-this' git_pack_redundant='git pack-redundant --i-still-use-this'

16
usage.c
View File

@ -386,21 +386,19 @@ NORETURN void you_still_use_that(const char *command_name, const char *hint)
STRBUF_ENCODE_SLASH); STRBUF_ENCODE_SLASH);


fprintf(stderr, fprintf(stderr,
_("'%s' is nominated for removal.\n"), command_name); _("'%s' will be removed soon.\n"), command_name);


if (hint) if (hint)
fputs(hint, stderr); fputs(hint, stderr);


fprintf(stderr, fprintf(stderr,
_("If you still use this command, here's what you can do:\n" _("If you need a replacement:\n"
"\n" "\n"
"- read https://git-scm.com/docs/BreakingChanges.html\n" "- Read https://git-scm.com/docs/BreakingChanges.html.\n\n"
"- check if anyone has discussed this on the mailing\n" "- Check what others on the mailing list suggest as a replacement:\n"
" list and if they came up with something that can\n" " https://lore.kernel.org/git/?q=%s\n\n"
" help you: https://lore.kernel.org/git/?q=%s\n" "- Send an email to <git@vger.kernel.org> asking for help, only if\n"
"- send an email to <git@vger.kernel.org> to let us\n" " suggestions by others do not work for you.\n"
" know that you still use this command and were unable\n"
" to determine a suitable replacement\n"
"\n"), "\n"),
percent_encoded.buf); percent_encoded.buf);
strbuf_release(&percent_encoded); strbuf_release(&percent_encoded);