diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-05-12 12:03:06 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-12 13:11:43 -0700 |
| commit | 4511d56e1a4c09abbe0c6b513fd858072b55cbd8 (patch) | |
| tree | 271500df982c28552fda1efd74aa7b115156f902 /git-compat-util.h | |
| parent | CI updates (diff) | |
| download | git-4511d56e1a4c09abbe0c6b513fd858072b55cbd8.tar.gz git-4511d56e1a4c09abbe0c6b513fd858072b55cbd8.zip | |
you-still-use-that??: help deprecating commands for removal
Commands slated for removal like "git pack-redundant" now require
an explicit "--i-still-use-this" option to run. This is to
discourage casual use and surface their pending deprecation to
users.
The warning message is long, so factor it into a helper function
you_still_use_that() to simplify reuse by other commands.
Also add a missing test to ensure this enforcement works for
"pack-redundant".
Helped-by: Elijah Newren <newren@gmail.com>
[en: log message]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
| -rw-r--r-- | git-compat-util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index e123288e8f..21cab99567 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -703,6 +703,8 @@ void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2))); void show_usage_if_asked(int ac, const char **av, const char *err); +NORETURN void you_still_use_that(const char *command_name); + #ifndef NO_OPENSSL #ifdef APPLE_COMMON_CRYPTO #include "compat/apple-common-crypto.h" |
