git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brandon Casey <casey@nrlssc.navy.mil>
To: Lars Hjemli <hjemli@gmail.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	hanwen@xs4all.nl, git@vger.kernel.org
Subject: Re: Spam: Re: git branch performance problem?
Date: Wed, 10 Oct 2007 17:55:25 -0500	[thread overview]
Message-ID: <470D585D.1030808@nrlssc.navy.mil> (raw)
In-Reply-To: <8c5c35580710101445h232f9a67jd0c326b3b97ae3dd@mail.gmail.com>

Lars Hjemli wrote:
> On 10/10/07, J. Bruce Fields <bfields@fieldses.org> wrote:
>> On Wed, Oct 10, 2007 at 06:30:02PM -0300, Han-Wen Nienhuys wrote:
>>> could it be that GC does not handle cyclic alternates correctly?
>> Does it handle alternates at all?  If you run git-gc on a repository
>> which other repositories get objects from, then my impression was that
>> bad things happen.
>>
> 
> AFAIK 'git gc' is safe, while 'git gc --prune' will remove loose
> (unreferenced) objects.

No, this is not the case, unless something has changed very recently
in git-gc or git-repack. Even git-gc with no arguments is unsafe if
the repository being gc'ed is listed in another's alternates.

git-gc calls repack with -a and -d. which causes a new pack to be
created which only contains the objects required by the local repository.
The other packs are then deleted. Objects contained in those packs and
required by a "sharing" repository (one using the alternates mechanism)
will be deleted if the local repository no longer references them.

Maybe git-gc should make use of repack's new -A option by default and
only use -a (and not -A) when --prune is specified...

-brandon

  parent reply	other threads:[~2007-10-10 22:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 20:22 git branch performance problem? Han-Wen Nienhuys
2007-10-10 20:44 ` Lars Hjemli
2007-10-10 21:17   ` Han-Wen Nienhuys
2007-10-10 21:24     ` Han-Wen Nienhuys
2007-10-10 21:30       ` Han-Wen Nienhuys
2007-10-10 21:39         ` J. Bruce Fields
2007-10-10 21:45           ` Lars Hjemli
2007-10-10 21:49             ` Han-Wen Nienhuys
2007-10-10 21:53               ` J. Bruce Fields
2007-10-10 22:01                 ` Han-Wen Nienhuys
2007-10-10 21:53               ` Johannes Schindelin
2007-10-10 22:55             ` Brandon Casey [this message]
2007-10-11  9:41               ` Spam: " Mike Ralphson
2007-10-11 10:58                 ` Johannes Schindelin
2007-10-10 23:39         ` Linus Torvalds
2007-10-11  2:26           ` Han-Wen Nienhuys
2007-10-11  6:41             ` Alex Riesen
2007-10-11 10:46             ` Johannes Schindelin
2007-10-11 13:11               ` Han-Wen Nienhuys
2007-10-11 15:16             ` Linus Torvalds
2007-10-12 17:19             ` Salikh Zakirov
2007-10-10 21:34       ` Lars Hjemli
2007-10-10 21:54       ` [PATCH] git-branch: only traverse the requested refs Lars Hjemli
2007-10-10 23:00         ` Johannes Schindelin
2007-10-10 23:30           ` Lars Hjemli

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=470D585D.1030808@nrlssc.navy.mil \
    --to=casey@nrlssc.navy.mil \
    --cc=bfields@fieldses.org \
    --cc=git@vger.kernel.org \
    --cc=hanwen@xs4all.nl \
    --cc=hjemli@gmail.com \
    /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).