git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] pack-redundant: document deprecation

From
Jeff King <peff@peff.net>
Date
Mar 28, 2023, 19:06 UTC
Message-ID
<20230328190641.GF18558@coredump.intra.peff.net>
In-Reply-To
<xmqqh6ub6u1p.fsf@gitster.g>
On Thu, Mar 23, 2023 at 02:23:46PM -0700, Junio C Hamano wrote:
> I notice that "git pack-redundant --help" does not say anything
> about its deprecation.  We probably should add one together with
> the patch in question, and then consider that the count-down timer
> has finally started.
Good thinking. Here is a patch.
-- >8 --
Subject: [PATCH] pack-redundant: document deprecation

Running the command itself has generated a warning for several versions, which has recently been upgraded to an error. Let's also make sure the documentation mentions what is going on. This also gives us a good spot to explain the reasoning and recommend alternatives.

Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/git-pack-redundant.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/Documentation/git-pack-redundant.txt b/Documentation/git-pack-redundant.txt
index 99ef13839d4..13c3eb5ec96 100644
--- a/Documentation/git-pack-redundant.txt
+++ b/Documentation/git-pack-redundant.txt
@@ -11,6 +11,20 @@ SYNOPSIS
 [verse]
 'git pack-redundant' [--verbose] [--alt-odb] (--all | <pack-filename>...)
 
+WARNING
+-------
+`git pack-redundant` has been deprecated and is scheduled for removal in
+a future version of Git. Because it can only remove entire duplicate
+packs and not individual duplicate objects, it is generally not a useful
+tool for reducing repository size. You are better off using `git gc` to
+do so, which will put objects into a new pack, removing duplicates.
+
+Running `pack-redundant` without the `--i-still-use-this` flag will fail
+in this release. If you believe you have a use case for which
+`pack-redundant` is better suited and oppose this removal, please
+contact the Git mailing list at git@vger.kernel.org. More information
+about the list is available at https://git-scm.com/community.
+
 DESCRIPTION
 -----------
 This program computes which packs in your repository
-- 
2.40.0.616.gf524ec75088
Previous: Junio C Hamano
Message 5 of 5 in “pack-redundant: escalate deprecation warning to an error”
  1. pack-redundant: escalate deprecation warning to an errorJeff King, Mar 23, 2023
  2. Junio C HamanoMar 23, 2023
  3. Taylor BlauMar 23, 2023
  4. Junio C HamanoMar 23, 2023
  5. pack-redundant: document deprecationJeff King, Mar 28, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.