X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-repack.sh;h=4e16d34971d5045b095a42cfe27819e666f157a6;hb=22a06b3c474d256e945dbc0d2a830c3f467288b5;hp=49547a77c75356fb12dc3c9451a8983e06f81240;hpb=29504118f8528f658fd0bfc02d8d78d4c01dc2cc;p=git.git diff --git a/git-repack.sh b/git-repack.sh index 49547a77..4e16d349 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -11,7 +11,7 @@ do case "$1" in -n) no_update_info=t ;; -a) all_into_one=t ;; - -d) remove_redandant=t ;; + -d) remove_redundant=t ;; -l) local=t ;; *) break ;; esac @@ -32,8 +32,8 @@ case ",$all_into_one," in rev_list= rev_parse='--all' pack_objects= - # This part is a stop-gap until we have proper pack redundancy - # checker. + + # Redundancy check in all-into-one case is trivial. existing=`cd "$PACKDIR" && \ find . -type f \( -name '*.pack' -o -name '*.idx' \) -print` ;; @@ -56,12 +56,13 @@ mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" && mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" || exit -if test "$remove_redandant" = t +if test "$remove_redundant" = t then - # We know $existing are all redandant only when + # We know $existing are all redundant only when # all-into-one is used. if test "$all_into_one" != '' && test "$existing" != '' then + sync ( cd "$PACKDIR" && for e in $existing do