git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Kastrup <dak@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: How do I manage this setup with git-svn and/or git remotes?
Date: Fri, 17 Aug 2007 11:53:06 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.999.0708171142510.30176@woody.linux-foundation.org> (raw)
In-Reply-To: <86d4xmxbjf.fsf@lola.quinscape.zz>



On Fri, 17 Aug 2007, David Kastrup wrote:
> 
> But it isn't an independent git project: the superproject has its
> _own_ copy of dsp, with its _own_ specific commits and fixes that are
> not supposed to ever end up in the dsp "mothership". 

Sure. And that's different from any git "branch" exactly how?

So you'd have different branches in the superproject - the way you always 
have when you have two copies of a git project. And then you merge between 
the two at will.

> With Subversion, I can actually merge files in different projects of
> the repository even when they are in different directory levels.  Of
> course, since Subversion does not track any merge info, that is not an
> accomplishment.

Right. Git can do that too. It's called "patches".

> And that is the problem here: in this case it does not make sense to
> see it as a separate project, and in particular, it needs to be in
> synch with the tags/branches of the superproject, and particularly
> while I am using git-svn.

I do agree that the "git svn" interaction may end up making it unworkable, 
if only because git-svn simply doesn't know/understand about submodules. 
But the submodule *would* be well-specified by the tags and branches in 
the superproject, so that shouldn't be a problem in itself.

> > Another alternative is to do what git has long done with "gitk": you
> > can maintain a separate project and just merge it directly into
> > another git project, and it works fine that way, but it gets
> > impossible to merge back and forth between the two projects (you can
> > only merge one way: make all the major changes in the "dsp" project,
> > and then you can just merge it into the project that uses it (but if
> > you fix things in the bigger project, you can't merge the fixes
> > back, you'll have to export the fixes as patches and do them in the
> > "dsp" tree).
> 
> Well, that would be at least quite handy for propagating upstream dsp
> fixes into project/great.  How do I merge one project into a
> _subdirectory_ of another one?

There's a special "subtree" merge that does exactly that: it basically is 
the normal recursive merge, except it merges into a subtree. I think 
that's how Junio does the "git-gui" merges. Junio?

			Linus

  reply	other threads:[~2007-08-17 18:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-17 17:24 How do I manage this setup with git-svn and/or git remotes? David Kastrup
2007-08-17 17:56 ` Linus Torvalds
2007-08-17 18:26   ` David Kastrup
2007-08-17 18:53     ` Linus Torvalds [this message]
2007-08-17 21:04       ` David Kastrup
2007-08-17 21:18       ` Junio C Hamano
2007-08-17 21:32         ` David Kastrup
2007-08-18  7:07           ` David Kastrup
2007-08-18 23:37     ` Jakub Narebski
2007-08-19 16:04       ` David Kastrup

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.999.0708171142510.30176@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=dak@gnu.org \
    --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).