git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andy Parkins <andyparkins@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Bug: segfault during git-prune
Date: Thu, 28 Jun 2007 09:09:56 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.98.0706280901580.8675@woody.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.0.98.0706280844460.8675@woody.linux-foundation.org>



On Thu, 28 Jun 2007, Linus Torvalds wrote:
> 
> Yeah, git-fsck knows about subprojects. I bet git-prune just doesn't. 
> 
> And indeed.. Here's a patch for it, but the fact is, you really should 
> *not* prune that repository, because you'll prune away all the subproject 
> data, which you seem to have in the same repo!
> 
> (General rule: never *ever* prune a shared object repository!)

Btw, we could make the "reachable" code say that *if* you have the commit 
of a subproject in your current object directory, it will follow that 
commit recursively, and thus sharing an object store at the superproject 
level is "ok" as far as "git prune" is concerned.

We don't currently even have that kind of function, though. Calling 
"parse_commit()" will complain very loudly if the commit doesn't exist, 
but it's actually perfectly fine to not exist if it's in a separate 
subproject.

So if you actually want to use subprojects *and* prune them, *and* you 
want to keep all the subproject objects in the same big object database, 
you'd have to add some commit object "parse-if-you-can-find-it" thing, and 
use that.

It shouldn't be fundamentally hard, but it's _not_ what my patch did. My 
patch just says: "subprojects are separate projects, and we don't do 
reachability from superproject to subproject".

		Linus

  reply	other threads:[~2007-06-28 16:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 10:34 Bug: segfault during git-prune Andy Parkins
2007-06-28 10:52 ` Andy Parkins
2007-06-28 15:59 ` Linus Torvalds
2007-06-28 16:09   ` Linus Torvalds [this message]
2007-06-28 22:21   ` Andy Parkins
2007-06-28 22:31     ` Linus Torvalds
2007-06-29 12:39       ` Andy Parkins
2007-07-02 10:00       ` Andy Parkins
2007-07-02 11:45         ` Linus Torvalds
2007-07-02 13:25           ` Andy Parkins
2007-07-02 21:01             ` Linus Torvalds

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=alpine.LFD.0.98.0706280901580.8675@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.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).