git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eran Tromer <git2eran@tromer.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] repack: allow simultaneous packing and pruning
Date: Wed, 11 Oct 2006 00:09:00 +0200	[thread overview]
Message-ID: <452C19FC.7030001@tromer.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0610101423561.3952@g5.osdl.org>

On 2006-10-10 23:25, Linus Torvalds wrote:
> On Tue, 10 Oct 2006, Eran Tromer wrote:
>> Too late: "git repack -a -d" already does it, in contradiction to its 
>> manpage. It creates a new pack by following .git/refs, and then deletes 
>> all old pack files.
> 
> That's very different.
> 
> That just means that you should not try to do two _concurrent_ repacks. 

How so? This process loses the unreferenced objects from the old packs,
where "referenced" is determined in a racy way. Same problem.

> 
>> Don't run it on a shared repo, then. And grab a coffee while it runs.
>> But why force leaf repositories to accumulate garbage?
> 
> Nobody forces that.
> 
> You can run "git prune" if you want to. But at least we know that "git 
> prune" is unsafe.

But "git prune" does not GC packs, only loose objects.

Anyway, I think the right thing to do is to make "git repack -a -d"
operate safely (not drop any objects), and add a new --prune option
so that "git repack -a -d --prune" does what "git repack -a -d" used to do.

  Eran

  reply	other threads:[~2006-10-10 22:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-10 10:14 [PATCH] repack: allow simultaneous packing and pruning Sam Vilain
2006-10-10 11:04 ` Sam Vilain
2006-10-10 15:03 ` Linus Torvalds
2006-10-10 19:46   ` Eran Tromer
2006-10-10 21:25     ` Linus Torvalds
2006-10-10 22:09       ` Eran Tromer [this message]
2006-10-10 22:27         ` Linus Torvalds
2006-10-10 23:45           ` Eran Tromer
2006-10-10 20:24   ` 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=452C19FC.7030001@tromer.org \
    --to=git2eran@tromer.org \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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).