summaryrefslogtreecommitdiff
path: root/builtin/pack-redundant.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-01-25 14:19:17 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-25 14:19:18 -0800
commitdfcd90506998c1de8d8ef86431c86ef9ed626c30 (patch)
tree8bcb3da106401aedd656684e4acb6d7eead26ab5 /builtin/pack-redundant.c
parentMerge branch 'jk/forbid-lf-in-git-url' (diff)
parentpack-redundant: gauge the usage before proposing its removal (diff)
downloadtgif-dfcd90506998c1de8d8ef86431c86ef9ed626c30.tar.xz
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.c13
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