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

Re: [PATCH 0/4] subtree: move out of contrib

From
Stefan Beller <sbeller@google.com>
Date
Apr 30, 2018, 21:38 UTC
Message-ID
<CAGZ79kakirTjA32cTmByLpjnb3QKUL5eGEgPFFMhUnewC73S8Q@mail.gmail.com>
In-Reply-To
<CAHqTa-0xZteMjgJUZ-_Dv5KcX8sVVWHYu=OdRebVEfYfyP0QRw@mail.gmail.com>
On Mon, Apr 30, 2018 at 1:45 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
Show 9 quoted lines
> On Mon, Apr 30, 2018 at 5:50 AM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> I think at this point git-subtree is widely used enough to move out of
>> contrib/, maybe others disagree, but patches are always better for
>> discussion that patch-less ML posts.
>
> I really was hoping git-subtree would be completely obsoleted by
> git-submodule by now, but... it hasn't been, so... no objections on
> this end.
No objections from me either.
Submodules seem to serve a slightly different purpose, though?

With Subtrees the superproject always contains all the code, even when you squash the subtree histroy when merging it in. In the submodule world, you may not have access to one of the submodules.

Submodules do not need to produce a synthetic project history when splitting off again, as the history is genuine. This allows for easier work with upstream.

Subtrees present you the whole history by default and the user needs to be explicit about not wanting to see history from the subtree, which is the opposite of submodules (though this may be planned in the future to switch).

Show 6 quoted lines
> The gerrit team (eg. Stefan Beller) has been doing some really great
> stuff to make submodules more usable by helping with relative
> submodule links and by auto-updating links in supermodules at the
> right times.  Unfortunately doing that requires help from the server
> side, which kind of messes up decentralization and so doesn't solve
> the problem in the general case.
Conceptually Gerrit is doing
  while true:
    git submodule update --remote
    if worktree is dirty:
        git commit "update the submodules"
just that Gerrit doesn't poll but does it event based.
> I really wish there were a good answer, but I don't know what it is.
> I do know that lots of people seem to at least be happy using
> git-subtree, and would be even happier if it were installed
> automatically with git.
https://trends.google.com/trends/explore?date=all&q=git%20subtree,git%20submodule
Not sure what to make of this data.
Previous: Avery PennarunNext: Avery Pennarun
Message 8 of 15 in “subtree: move out of contrib”
  1. 0/4 subtree: move out of contribÆvar Arnfjörð Bjarmason, Apr 30, 2018
  2. 2/4 subtree: remove support for git version <1.7Ævar Arnfjörð Bjarmason, Apr 30, 2018
  3. 1/4 git-subtree: move from contrib/subtree/Ævar Arnfjörð Bjarmason, Apr 30, 2018
  4. 3/4 subtree: fix a test failure under GETTEXT_POISONÆvar Arnfjörð Bjarmason, Apr 30, 2018
  5. 4/4 i18n: translate the git-subtree commandÆvar Arnfjörð Bjarmason, Apr 30, 2018
  6. Philip OakleyApr 30, 2018
  7. Avery PennarunApr 30, 2018
  8. Stefan BellerApr 30, 2018
  9. Avery PennarunApr 30, 2018
  10. Stefan BellerApr 30, 2018
  11. Ævar Arnfjörð BjarmasonApr 30, 2018
  12. Avery PennarunApr 30, 2018
  13. Duy NguyenMay 1, 2018
  14. Johannes SchindelinMay 1, 2018
  15. Ævar Arnfjörð BjarmasonMay 1, 2018

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.