git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: Lukas Sandstr__m <lukass@etek.chalmers.se>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: Re: Remove unneeded packs
Date: Sun, 13 Nov 2005 15:00:51 +0300	[thread overview]
Message-ID: <20051113150051.4a10365d.vsu@altlinux.ru> (raw)
In-Reply-To: <43771C43.7000104@etek.chalmers.se>

[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]

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 <lukass@etek.chalmers.se>
> 
> ---
> 
>  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").

> +then
> +	sync
> +	( cd "$PACKDIR" &&
> +		for e in $existing
> +		do
> +		case "$e" in
> +		./pack-$name.pack | ./pack-$name.idx) ;;
> +		*)	rm -f $e ;;
> +		esac
> +		done
> +	)
> +else if test "$remove_redandant" = t
>  then
>  	sync
>  	redundant=$(git-pack-redundant --all)
> ---
> 0.99.9.GIT

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-11-13 12:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12 13:04 Remove unneeded packs Marcel Holtmann
2005-11-12 13:13 ` Andreas Ericsson
2005-11-12 13:30   ` Marcel Holtmann
2005-11-12 22:02     ` Lukas Sandström
2005-11-12 22:13       ` Marcel Holtmann
2005-11-13  2:38       ` Junio C Hamano
2005-11-13 10:58         ` Lukas Sandström
2005-11-13 12:00           ` Sergey Vlasov [this message]
2005-11-13 12:07             ` Lukas Sandström
2005-11-13 12:20               ` Sergey Vlasov
2005-11-13 12:31                 ` Lukas Sandström
2005-11-12 13:40 ` Craig Schlenter
2005-11-12 13:59   ` Balanced packing strategy Petr Baudis
2005-11-12 15:14     ` Craig Schlenter
2005-11-13  2:34       ` Junio C Hamano
2005-11-13 11:00         ` Petr Baudis
2005-11-13 20:06     ` Josef Weidendorfer
2005-11-13 23:13       ` Junio C Hamano

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051113150051.4a10365d.vsu@altlinux.ru \
    --to=vsu@altlinux.ru \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=lukass@etek.chalmers.se \
    /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.
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 NNTP newsgroup(s).