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@vger.kernel.org
Subject: Re: Bug: segfault during git-prune
Date: Thu, 28 Jun 2007 15:31:27 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.98.0706281525460.8675@woody.linux-foundation.org> (raw)
In-Reply-To: <200706282321.44244.andyparkins@gmail.com>



On Thu, 28 Jun 2007, Andy Parkins wrote:
> 
> I had hoped that git-prune wouldn't be a risk because I have:
> 
>  * -- * -- * -- * -- * (ffmpeg-svn)
> 
>       * -- * -- * -- * (libswscale-svn)

Ok. If all subproject branches are also visible in the superproject as 
refs, then "git prune" should work fine, and you can apply my patch and it 
should just work very naturally: the reachability analysis will find the 
subprojects not through the superproject link, but simply through the 
direct refs to the subproject.

> > (General rule: never *ever* prune a shared object repository!)
> 
> Even when I'm sure that every object of interest is behind a head ref?

So yes, in that case, you're ok.

This is not unlike just having two different repositories sharing the same 
object directory: as long as the two different repositories both have the 
appropriate refs, pruning is fine. In other words, you can see them as 
just independent branches in the same repo.

And in fact, subprojects are obviously very much *designed* to work that 
way: a subproject is basically a "different repository". So the basic rule 
is that if it would work with totally independent repos, it works with 
subprojects.

[ That's all aside from the kind of bug that you found, where some code 
  that parses the tree structures hadn't been updated for subprojects, of 
  course ]

Anyway, if that patch works for you, I'd suggest you just pass it on to 
Junio (and feel free to add my "Signed-off-by:" on it - but conditional on 
you having actually tested it).

		Linus

  reply	other threads:[~2007-06-28 22:31 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
2007-06-28 22:21   ` Andy Parkins
2007-06-28 22:31     ` Linus Torvalds [this message]
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.0706281525460.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).