Jeff King <peff@xxxxxxxx> writes: > OK, that's the part I was missing. The discussion here and the statement > from git-repack(1): > > -d > After packing, if the newly created packs make some existing packs > redundant, remove the redundant packs. Also run git prune-packed > to remove redundant loose object files. > > made me think that it was running pack-redundant. But it doesn't seem > to. It looks like we stopped doing so in 6ed64058e1 (git-repack: do not > do complex redundancy check., 2005-11-19). Thanks for digging. A good opportunity for a #leftoverbits documentation update from new people is here. > As an aside, we tried using pack-redundant at GitHub several years ago > for dropping packs that were replicated in alternates storage. It > performs very poorly (quadratically, perhaps?) to the point that we > found it unusable,... Yes, I originally wrote "the pack-redundant subcommand" in the message you are responding to with a bit more colourful adjectives, but rewrote it ;-) My recollection from the last time I looked at it is that it is quadratic or even worse---that was long time ago, but on the other hand I think the subcommand had no significant improvement over the course of its life. Perhaps it is time to drop it. -- >8 -- Subject: [RFC] 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 disable the normal use of command by making it error out with a big message that asks the user to tell us that they still care about the command, with an escape hatch to override it with a command line option. Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- builtin/pack-redundant.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index 178e3409b7..97cf3df79b 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,25 @@ 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) { + puts(_("'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@xxxxxxxxxxxxxxx>. Thanks\n")); + exit(1); + } + if (load_all_packs) load_all(); else