From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Dana How <danahow@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] make "repack -f" imply "pack-objects --no-reuse-object"
Date: Wed, 09 May 2007 12:59:40 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.0.99.0705091247450.24220@xanadu.home> (raw)
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:
> 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
next prev parent reply other threads:[~2007-05-09 16:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 22:38 [PATCH v2] Custom compression levels for objects and packs Dana How
2007-05-08 23:56 ` Junio C Hamano
2007-05-09 0:16 ` Nicolas Pitre
2007-05-09 0:29 ` Dana How
2007-05-09 1:03 ` Nicolas Pitre
2007-05-09 6:46 ` Dana How
2007-05-09 7:13 ` Junio C Hamano
2007-05-09 0:25 ` Dana How
2007-05-09 1:23 ` Nicolas Pitre
2007-05-09 9:21 ` Dana How
2007-05-09 15:27 ` Nicolas Pitre
2007-05-09 16:26 ` Junio C Hamano
2007-05-09 16:42 ` Dana How
2007-05-09 16:59 ` Nicolas Pitre [this message]
2007-05-09 18:42 ` [PATCH] deprecate the new loose object header format Nicolas Pitre
2007-05-09 20:16 ` Dana How
2007-05-09 20:42 ` Nicolas Pitre
2007-05-09 21:00 ` Dana How
2007-05-09 5:59 ` [PATCH v2] Custom compression levels for objects and packs Junio C Hamano
2007-05-09 6:24 ` Dana How
2007-05-09 0:30 ` Petr Baudis
2007-05-09 13:56 ` Theodore Tso
2007-05-09 16:44 ` Dana How
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.0.99.0705091247450.24220@xanadu.home \
--to=nico@cam.org \
--cc=danahow@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).