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

Re: Adding nested repository with slash adds files instead of gitlink

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 13, 2024, 17:18 UTC
Message-ID
<xmqqle105oko.fsf@gitster.g>
In-Reply-To
<8436c2bf-45cf-8009-14cd-c5ca708ece08@gmx.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 20 quoted lines
>> >> Abusing a long standing bug does not make it a feature. I'm not
>> >> opposed to having a new option to keep that behavior, but it should
>> >> not be the default. If you use it that way, you're on your own.
>> >
>> > Was such an option ever worked on?
>>
>> No.
>>
>> I do not recall hearing anybody who have been active in the
>> development community saying anything good about such an option.
>> For the past 6 or so years, nobody who actively works on git thought
>> it was an interesting and/or useful thing to work on.
>>
>> I cannot quite say that they thought that it is actively a bad idea
>> to offer such an option, though.
>
> I have encountered the wish quite frequently to be able to make changes in
> a subdirectory and have them reflected as a commit that is both part of
> that subdirectory's revision history as well as part of the containing
> project's.

Let me make sure I understand the above. You create a commit to contain the change in the submodule and at the same time create a new commit to bind the updated submodule commit to superproject tree. If that is what you are talking about, of course, that would be a nice thing to have. Sort of "commit --recursive". It is still debatable what to do with the log messages, though (you want to leave in the submodule an explanation that is understandable in the scope of the submodule, while you want to record in the superproject a bigger picture reasoning).

But I did not get the impression that it is what the original poster wants. My reading of the original thread (this is a resurrection of an antient thread dating back to 2018) was that you have a submodule at path S, you muck with a file in S/file, and you want to commit in the context of the superproject, having the superproject track S/file in its history (not just S gitlink).

And that is quite different from what you said.
Previous: Johannes SchindelinNext: Phil Sainty
Message 20 of 22 in “Adding nested repository with slash adds files instead of gitlink”
  1. Heiko VoigtJun 18, 2018
  2. Duy NguyenJun 18, 2018
  3. Brandon WilliamsJun 18, 2018
  4. Heiko VoigtJun 19, 2018
  5. Duy NguyenJun 19, 2018
  6. Junio C HamanoJun 19, 2018
  7. Duy NguyenJun 19, 2018
  8. Duy NguyenJun 19, 2018
  9. Duy NguyenJun 19, 2018
  10. Kevin DaudtJun 18, 2018
  11. Heiko VoigtJun 19, 2018
  12. Rafael AscensãoJun 19, 2018
  13. Kevin DaudtJun 20, 2018
  14. Rafael AscensãoJun 20, 2018
  15. Duy NguyenJun 20, 2018
  16. Rafael AscensãoJun 20, 2018
  17. Phil SaintyAug 8, 2024
  18. Junio C HamanoAug 8, 2024
  19. Johannes SchindelinAug 13, 2024
  20. Junio C HamanoAug 13, 2024
  21. Phil SaintyAug 13, 2024
  22. Johannes SchindelinAug 14, 2024

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.