git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Merges without bases

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Aug 26, 2005, 16:37 UTC
Message-ID
<Pine.LNX.4.63.0508261150320.23242@iabervon.org>
In-Reply-To
<46a038f905082602176f9eef5d@mail.gmail.com>
On Fri, 26 Aug 2005, Martin Langhoff wrote:
Show 16 quoted lines
> On 8/26/05, Junio C Hamano <junkio@cox.net> wrote:
> > their core GIT tools come from.  But how would _I_ pull from
> > that "My Project", if I did not want to pull unrelated stuff in?
>
> and then...
>
> > What I think _might_ deserve a bit more support would be a merge
> > of a foreign project as a subdirectory of a project.  Linus
>
> tla has an interesting implementation (and horrible name) for
> something like this. In Arch-speak, they are called 'configurations',
> a versioned control file that describes that in subdirectory foo we
> import from this other repo#branch.
>
> In cvs, you just do nested checkouts, and trust a `cvs update` done at
> the top will do the right thing;  and in fact recent cvs versions do.

The problem with both of these (and doing it in the build system) is that, when a project includes another project, you generally don't want whatever revision of the included project happens to be the latest; you want the revision of the included project that the revision of the including project you're looking at matches. That is, if App includes Lib, and you're looking at an App commit, you want to have the version of Lib that the commit was made with, not the latest version of Lib, which may not be backwards compatible across non-release commits, or, in any case, won't help in reconstructing a earlier state. I think a primary function of a SCM is to be able to say, "It worked last Friday, and it's broken now. What's different?" If the answer is, "On Saturday, we updated the included Lib to their version from Thursday, which is broken", it'll be really hard to track down without special tracking.

I think it's the lack of the special tracking, therefore, that makes this not a good feature in most SCMs, and makes them not better than having the build system do it (and potentially worse, if you've got your build system checking out a version specified in a version-controlled file). But I think that git can do better, including support for the required version sometimes being a locally modified one and sometimes being the official one when the local modifications have been accepted upstream.

	-Daniel
*This .sig left intentionally blank*
Previous: Martin LanghoffNext: Martin Langhoff
Message 10 of 12 in “Merges without bases”
  1. Darrin ThompsonAug 25, 2005
  2. Darrin ThompsonAug 25, 2005
  3. Junio C HamanoAug 25, 2005
  4. Darrin ThompsonAug 25, 2005
  5. Tim OttingerSep 8, 2005
  6. Daniel BarkalowAug 26, 2005
  7. Junio C HamanoAug 26, 2005
  8. Eric W. BiedermanSep 9, 2005
  9. Martin LanghoffAug 26, 2005
  10. Daniel BarkalowAug 26, 2005
  11. Martin LanghoffAug 27, 2005
  12. Daniel BarkalowAug 27, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.