diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-26 01:19:17 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-26 01:19:18 +0300 |
commit | dfcd90506998c1de8d8ef86431c86ef9ed626c30 (patch) | |
tree | 8bcb3da106401aedd656684e4acb6d7eead26ab5 /builtin/pack-redundant.c | |
parent | c7b1aaf6d6bb5746a98831854313ca8fccea600d (diff) | |
parent | c3b58472be2c647cd0c5af328980b15bd3f43b69 (diff) |
Merge branch 'jc/deprecate-pack-redundant'
Warn loudly when the "pack-redundant" command, which has been left
stale with almost unusable performance issues, gets used, as we no
longer want to recommend its use (instead just "repack -d" instead).
* jc/deprecate-pack-redundant:
pack-redundant: gauge the usage before proposing its removal
Diffstat (limited to 'builtin/pack-redundant.c')
-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 9fcea3e253..6e115a811a 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -560,6 +560,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; @@ -586,12 +587,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 |