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:20:18 +0300	[thread overview]
Message-ID: <20051113122017.GA9996@procyon.home> (raw)
In-Reply-To: <43772C96.9030805@etek.chalmers.se>

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

On Sun, Nov 13, 2005 at 01:07:50PM +0100, Lukas Sandstr?m wrote:
> Sergey Vlasov wrote:
> > On Sun, 13 Nov 2005 11:58:11 +0100 Lukas Sandstr?m wrote:

> >>-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.

But the old code was:

if test "$remove_redandant" = t
then
	# We know $existing are all redandant only when
	# all-into-one is used.
	if test "$all_into_one" != '' && test "$existing" != ''
	then
		sync
		( cd "$PACKDIR" &&
		  for e in $existing
		  do
			case "$e" in
			./pack-$name.pack | ./pack-$name.idx) ;;
			*)	rm -f $e ;;
			esac
		  done
		)
	fi
fi

So without the -d option nothing was removed, even with -a.

(And test "$existing" != '' might also be needed for some shells which
are confused by the empty list in the for statement.)

> Someone else gets to decide if git repack -a implies "remove all old packs".

If there is a separate -d option for this, just using -a probably
should not remove anything.

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

  reply	other threads:[~2005-11-13 12:20 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
2005-11-13 12:07             ` Lukas Sandström
2005-11-13 12:20               ` Sergey Vlasov [this message]
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=20051113122017.GA9996@procyon.home \
    --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).