From: Lukas Sandström Date: Sun, 13 Nov 2005 12:07:50 GMT Subject: Re: Remove unneeded packs Message-ID: <43772C96.9030805@etek.chalmers.se> In-Reply-To: <20051113150051.4a10365d.vsu@altlinux.ru> Sergey Vlasov wrote: > On Sun, 13 Nov 2005 11:58:11 +0100 Lukas Sandström wrote: > > >>Subject: [PATCH] Make sure all old packfiles are removed when doing a full repack >> >>This is nessecary because unrachable objects in packfiles makes git-pack-redundant >>flag them as non-redundant. >> >>Signed-off-by: Lukas Sandström >> >>--- >> >> git-repack.sh | 16 +++++++++++++++- >> 1 files changed, 15 insertions(+), 1 deletions(-) >> >>applies-to: 9a0f0c748316751fbf593a21f2b16bcdd975095a >>08df1f641bd3f98a607a8413d647667adc18a633 >>diff --git a/git-repack.sh b/git-repack.sh >>index f347207..293bb50 100755 >>--- a/git-repack.sh >>+++ b/git-repack.sh >>@@ -32,6 +32,8 @@ case ",$all_into_one," in >> rev_list= >> rev_parse='--all' >> pack_objects= >>+ existing=`cd "$PACKDIR" && \ >>+ find . -type f \( -name '*.pack' -o -name '*.idx' \) -print` >> ;; >> esac >> if [ "$local" ]; then >>@@ -60,7 +62,19 @@ mv .tmp-pack-$name.pack "$PACKDIR/pack-$ >> mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" || >> exit >> >>-if test "$remove_redandant" = t >>+if test "$all_into_one" = t > > > This should be > > if test "$all_into_one$remove_redandant" = tt > > (otherwise "git repack -a" becomes the same as "git repack -a -d"). > > This was the behaviour before git-pack-redundant, I just restored it. Someone else gets to decide if git repack -a implies "remove all old packs".