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

[PATCH] make "repack -f" imply "pack-objects --no-reuse-object"

From
Nicolas Pitre <nico@cam.org>
Date
May 9, 2007, 16:59 UTC
Message-ID
<alpine.LFD.0.99.0705091247450.24220@xanadu.home>
In-Reply-To
<7vlkfyt13i.fsf@assigned-by-dhcp.cox.net>
As Junio said:
  Recomputing delta is much more expensive than recompressing
  anyway, and when the user says 'repack -f', it is a sign that
  the user is willing to spend CPU cycles.
Signed-off-by: Nicolas Pitre <nico@cam.org>
---
On Wed, 9 May 2007, Junio C Hamano wrote:
Show 13 quoted lines
> Nicolas Pitre <nico@cam.org> writes:
> 
> > What we need instead is a --no-reuse-object that would force 
> > recompression of everything when you really want to enforce a specific 
> > compression level across the whole pack(s).
> 
> Yeah.  Or maybe --no-reuse to mean both and make '-f' a
> short-hand synonym for that.
> 
> I do not see much reason to want to tweak them independently;
> recomputing delta is much more expensive than recompressing
> anyway, and when the user says 'repack -f', it is a sign that
> the user is willing to spend CPU cycles.

This applies on top of my --no-reuse-object patch. I think it is good to have the flexibility in the plumbing, but as you say git-repack might as well use the strongest option.

diff --git a/git-repack.sh b/git-repack.sh
index ddfa8b4..8bf66a4 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -8,7 +8,7 @@ SUBDIRECTORY_OK='Yes'
 . git-sh-setup
 
 no_update_info= all_into_one= remove_redundant=
-local= quiet= no_reuse_delta= extra=
+local= quiet= no_reuse= extra=
 while case "$#" in 0) break ;; esac
 do
 	case "$1" in
@@ -16,7 +16,7 @@ do
 	-a)	all_into_one=t ;;
 	-d)	remove_redundant=t ;;
 	-q)	quiet=-q ;;
-	-f)	no_reuse_delta=--no-reuse-delta ;;
+	-f)	no_reuse=--no-reuse-object ;;
 	-l)	local=--local ;;
 	--window=*) extra="$extra $1" ;;
 	--depth=*) extra="$extra $1" ;;
@@ -61,7 +61,7 @@ case ",$all_into_one," in
 	;;
 esac
 
-args="$args $local $quiet $no_reuse_delta$extra"
+args="$args $local $quiet $no_reuse$extra"
 name=$(git-pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
 	exit 1
 if [ -z "$name" ]; then
Previous: Dana HowNext: Nicolas Pitre
Message 14 of 23 in “Custom compression levels for objects and packs”
  1. Custom compression levels for objects and packsDana How, May 8, 2007
  2. Junio C HamanoMay 8, 2007
  3. Nicolas PitreMay 9, 2007
  4. Dana HowMay 9, 2007
  5. Nicolas PitreMay 9, 2007
  6. Dana HowMay 9, 2007
  7. Junio C HamanoMay 9, 2007
  8. Dana HowMay 9, 2007
  9. Nicolas PitreMay 9, 2007
  10. Dana HowMay 9, 2007
  11. Nicolas PitreMay 9, 2007
  12. Junio C HamanoMay 9, 2007
  13. Dana HowMay 9, 2007
  14. make "repack -f" imply "pack-objects --no-reuse-object"Nicolas Pitre, May 9, 2007
  15. deprecate the new loose object header formatNicolas Pitre, May 9, 2007
  16. Dana HowMay 9, 2007
  17. Nicolas PitreMay 9, 2007
  18. Dana HowMay 9, 2007
  19. Junio C HamanoMay 9, 2007
  20. Dana HowMay 9, 2007
  21. Petr BaudisMay 9, 2007
  22. Theodore TsoMay 9, 2007
  23. Dana HowMay 9, 2007

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.