All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lukas Sandström" <lukass@etek.chalmers.se>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: Re: Remove unneeded packs
Date: Sun, 13 Nov 2005 13:31:55 +0100	[thread overview]
Message-ID: <4377323B.4000203@etek.chalmers.se> (raw)
In-Reply-To: <20051113122017.GA9996@procyon.home>

Sergey Vlasov wrote:
> 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.
> 
True. I forgot to look at the context around the changed lines...
Btw, remove_redundant is misspellt.
> (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.

True, but you will have trouble removing stale packfiles if they contain
unreachable objects unless you remove them when you create the -a pack.

Anyway, ignore the patch above.

  reply	other threads:[~2005-11-13 12:31 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
2005-11-13 12:31                 ` Lukas Sandström [this message]
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=4377323B.4000203@etek.chalmers.se \
    --to=lukass@etek.chalmers.se \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=vsu@altlinux.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.