Re: Bug: segfault during git-prune

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 2007, June 28, Linus Torvalds wrote:
> 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.

Excellent.  That's what I'd hoped.

I'm actually really impressed that git is robust enough that my symbolic 
linking of all the .git subdirectories works so well.  It's actually turned 
out to be a really natural way of using a repository for strongly connected 
submodules.

> 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.

Absolutely.  With my poor-mans submodule script that I was using before git 
had it's own submodule support, I had the script make a refs/superrefs 
directory, and every time I committed to the supermodule the script would 
write $subhash to $submodule/.git/refs/heads/superrefs/$subhash.  The it 
was safe to git-prune the submodules as well.

> 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.

I certainly agree, it's an extremely elegant way of working.  I can't 
imagine that any other VCS is capable of this sort of manipulation.

> 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).

Will do.  I'll certainly test it, and am happy to forward it on if that test 
is successful.


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux