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

Re: [TopGit PATCH] t/depend-add-using-export

From
ODOlaf Dabrunz <olaf@dabrunz.com>
Date
Oct 9, 2010, 12:21 UTC
Message-ID
<20101009122111.GA29010@santana.dyndns.org>
In-Reply-To
<AANLkTi=Xhd8DY+f1ZYR6dEhHvC-=50iHLnhdv8GTacNX@mail.gmail.com>
On 09-Oct-10, Bert Wesarg wrote:
Show 5 quoted lines
> On Sat, Oct 9, 2010 at 12:54, Olaf Dabrunz <Olaf.Dabrunz@gmx.net> wrote:
> > [...]
> 
> When I understand this correctly, this hand made merge commit on base,
> has also the just removed dep as parent. But the tree does not include

The hand made merge commit on base only has a removed dep as a parent if that removed dep is brought in again directly, as the new dep that is added here. The only parents of the hand made merge commit are: the tip of the current topgit branch's base and the new dependency.

    hand made merge commit on base =                        \
        git-commit-tree $tree_from_merge_on_export          \
                        -p $topgit_base_branch -p $new_dep

In general, the new dep may already have merged in a dep that we previously removed from our topgit branch. So the previously removed dep is brought in indirectly by merging a branch that contains it.

This patch tries to cover both cases. The latter case and requirements for tg depend add to cover it were discussed by you and Uwe in this thread:

http://lists-archives.org/git/688698-add-list-and-rm-sub-commands-to-tg-depend.html
> any code from that dep. So git merge-base would select this commit as

If the new dep _is_ a previously removed dep, the code of the new dep is contained in the hand made merge as well.

If the new dep _brings in_ a previously removed dep, it depends on how the previously removed dep was merged into the new dep we are trying to merge now. If our new dep merged in the previously removed dep but used the "ours" merge strategy to supersede that dep's contents, it does not bring in any code from that dep but only brings in that dep as part of it's history.

> the merge base.

Yes, as the previously removed dep is now -- directly or indirectly -- part of the history of the hand made merge on base.

I should really draw graphs. But here is the mail anyway (release early...).

Olaf
-- 
Olaf Dabrunz (Olaf <at> dabrunz.com)
Previous: Bert WesargNext: Bert Wesarg
Message 5 of 6 in “t/depend-add-using-export”
  1. t/depend-add-using-exportOlaf Dabrunz, Oct 9, 2010
  2. Bert WesargOct 9, 2010
  3. Olaf DabrunzOct 9, 2010
  4. Bert WesargOct 9, 2010
  5. Olaf DabrunzOct 9, 2010
  6. Bert WesargOct 9, 2010

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.