Skip to content

Commit

Permalink
make "repack -f" imply "pack-objects --no-reuse-object"
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed May 10, 2007
1 parent fa736f7 commit 479b56b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git-repack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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
-n) no_update_info=t ;;
-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" ;;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 479b56b

Please sign in to comment.