diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-25 15:45:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-15 14:30:11 -0800 |
commit | c3b58472be2c647cd0c5af328980b15bd3f43b69 (patch) | |
tree | 129c35f4cf2e05f70f60e19021c41ed692cbd71a /builtin | |
parent | Git 2.30-rc0 (diff) | |
download | tgif-c3b58472be2c647cd0c5af328980b15bd3f43b69.tar.xz |
pack-redundant: gauge the usage before proposing its removal
The subcommand is unusably slow and the reason why nobody reports it
as a performance bug is suspected to be the absense of users. Let's
show a big message that asks the user to tell us that they still
care about the command when an attempt is made to run the command,
with an escape hatch to override it with a command line option.
In a few releases, we may turn it into an error and keep it for a
few more releases before finally removing it (during the whole time,
the plan to remove it would be interrupted by end user raising hand).
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/pack-redundant.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index 3e70f2a4c1..d3b5ee8364 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -554,6 +554,7 @@ static void load_all(void) int cmd_pack_redundant(int argc, const char **argv, const char *prefix) { int i; + int i_still_use_this = 0; struct pack_list *min = NULL, *red, *pl; struct llist *ignore; struct object_id *oid; @@ -580,12 +581,24 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix) alt_odb = 1; continue; } + if (!strcmp(arg, "--i-still-use-this")) { + i_still_use_this = 1; + continue; + } if (*arg == '-') usage(pack_redundant_usage); else break; } + if (!i_still_use_this) { + fputs(_("'git pack-redundant' is nominated for removal.\n" + "If you still use this command, please add an extra\n" + "option, '--i-still-use-this', on the command line\n" + "and let us know you still use it by sending an e-mail\n" + "to <git@vger.kernel.org>. Thanks.\n"), stderr); + } + if (load_all_packs) load_all(); else |