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

Re: Composing git repositories

From
Phil Hord <phil.hord@gmail.com>
Date
Apr 1, 2013, 14:49 UTC
Message-ID
<CABURp0qnTLiB6zrdYfZfLP9+WJXT3umNggsfjT9TfDVn9V48HA@mail.gmail.com>
In-Reply-To
<51597A37.1010301@web.de>
On Mon, Apr 1, 2013 at 8:14 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 45 quoted lines
> Am 01.04.2013 01:50, schrieb Phil Hord:
>> On Sun, Mar 31, 2013 at 4:34 PM, Ramkumar Ramachandra
>> <artagnon@gmail.com> wrote:
>>> Jens Lehmann wrote:
>>>> Guess what: submodules are the solution for a certain set of use
>>>> cases, and tools like subtree are a solution for another set of
>>>> use cases. There is no silver bullet.
>>>
>>> That's the core of your argument: submodules already solve what it
>>> was meant to, and we can't get it to solve a larger class of problems.
>>>  In other words, you're implying that it's impossible to build a tool
>>> that will be able to compose git repositories in a way that solves a
>>> very large class of problems.  I don't see conclusive proof for this,
>>> so I have to disagree.
>>
>> I think it is possible to solve larger classes of problems with
>> submodules, but it is a harder problem than you seem to think.  In any
>> case I do not think you need to re-engineer submodules to improve
>> them.
>>
>> Sumodules are good for preserving history.  When properly managed,
>> they answer the question git always answers, "Where was my code in the
>> past?"  I would like proper management to be easier, but I understand
>> why it is difficult; and I see it getting easier.
>
> Exactly.
>
>> Some users also want submodules to handle other tasks, like "Import
>> branch-tracked upstream changes (i.e. git pull origin master)."  This
>> too is useful, but it is a different problem than submodules'
>> primarily try to solve.  But they do already solve _part_ of that
>> problem ("Show me how these modules are related"), so it seems a
>> trivial thing to ask them also to handle the "floating branch" task.
>> The trick is to handle this task in a way that does not break the task
>> they are designed and used for already.
>
> But I think we recently learned to support that use case with
> submodules. I think there are two floating models:
>
> - Tracked:
>   Follow a branch in the submodule and let git help you to advance
>   the submodule to the tip of that branch at certain times, but
>   still record a certain SHA-1 in the superproject to maintain
>   reproducibility. We support this since 1.8.2 (see 06b1abb5 by
>   Trevor).

Thanks. I followed that thread closely, but I thought the patch had stalled again. I'm glad to see it in master

Show 14 quoted lines
> - Untracked:
>   Some people just want "the newest" tip of a branch checked out in
>   the submodule and update that from time to time (I suspect this
>   is because they are used to SVN externals, which I believe work
>   that way). You throw away reproducibility, which I think is not
>   good and not the way I expect Git to work. But that use case is
>   achieved with a simple script and some config settings telling
>   Git to don't even look for changes in the submodule anymore, and
>   submodule infrastructure will set up everything for you after
>   cloning the superproject. You run your custom script from time
>   to time and have a truly floating submodule.
>
> So to me it looks we support both floating models with current Git's
> submodule infrastructure.

Well, for that matter, the "tracked" floating tip was also a simple script once a upon a time. To say we support both is nothing new. You could say we supported both in 1.8.1, and now we support "Tracked" a little bit better in 1.8.2.

I think the difference is that everyone's expectation for "Untracked" is a little bit different; or maybe it is just dangerous enough that it should not be a core feature.

But I ain't complainin'.
Phil
Previous: Jens LehmannNext: Ramkumar Ramachandra
Message 32 of 43 in “Composing git repositories”
  1. Ramkumar RamachandraMar 26, 2013
  2. Junio C HamanoMar 26, 2013
  3. Ramkumar RamachandraMar 27, 2013
  4. Junio C HamanoMar 27, 2013
  5. Ramkumar RamachandraMar 27, 2013
  6. Junio C HamanoMar 27, 2013
  7. Jonathan NiederMar 27, 2013
  8. Junio C HamanoMar 27, 2013
  9. Jonathan NiederMar 27, 2013
  10. Ramkumar RamachandraMar 28, 2013
  11. Jens LehmannMar 28, 2013
  12. Ramkumar RamachandraMar 28, 2013
  13. Jonathan NiederMar 28, 2013
  14. Jens LehmannMar 28, 2013
  15. Jens LehmannMar 27, 2013
  16. Ramkumar RamachandraMar 28, 2013
  17. Jens LehmannMar 28, 2013
  18. Ramkumar RamachandraMar 31, 2013
  19. Jonathan NiederMar 31, 2013
  20. Ramkumar RamachandraApr 2, 2013
  21. Jeff KingApr 2, 2013
  22. Ramkumar RamachandraApr 2, 2013
  23. Jens LehmannApr 2, 2013
  24. Junio C HamanoApr 2, 2013
  25. Junio C HamanoApr 4, 2013
  26. Duy NguyenApr 5, 2013
  27. Junio C HamanoApr 5, 2013
  28. Duy NguyenApr 5, 2013
  29. Jens LehmannApr 5, 2013
  30. Phil HordMar 31, 2013
  31. Jens LehmannApr 1, 2013
  32. Phil HordApr 1, 2013
  33. Ramkumar RamachandraApr 2, 2013
  34. Jonathan NiederApr 2, 2013
  35. Junio C HamanoApr 2, 2013
  36. Ramkumar RamachandraApr 2, 2013
  37. Jonathan NiederApr 2, 2013
  38. Ramkumar RamachandraApr 2, 2013
  39. Ramkumar RamachandraApr 2, 2013
  40. Jens LehmannApr 2, 2013
  41. Jens LehmannApr 1, 2013
  42. Seth RobertsonApr 1, 2013
  43. Ramkumar RamachandraApr 2, 2013

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.