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

Re: [WIP/PATCH 4/9] Teach merge the --[no-]recurse-submodules option

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2014, 22:00 UTC
Message-ID
<xmqqeh3etwg8.fsf@gitster.dls.corp.google.com>
In-Reply-To
<52F54ED7.2010302@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 16 quoted lines
> I think the user needs to sort things out, just like she has to do
> when a file has a merge conflict. But unfortunately we cannot use
> conflict markers here, so I'd propose the following:
>
> * When merge proposes a merge resolution (which it does today by
>   telling the user "Found a possible merge resolution for the
>   submodule ... [use] git update-index --cacheinfo 160000 ...")
>   that commit should be checked out in the submodule but not
>   staged. Then the user can simply add and commit.
>
> * If the merge resolution is not obvious to merge, it leaves the
>   submodule in an unmerged state, the local commit still being
>   checked out. The user has to manually do the merge in the
>   submodule and commits that in the superproject.
>
> Does that make sense?
The latter one does not worry me too much.

For the former, "add and commit" at the top-level makes perfect sense, and the "commit should be checked out in the submodule" is a necessary step to sanity-check and prepare for that "add and commit" step, but what does "checked out in the submodule" exactly mean? Do we detach the HEAD at the commit? Do we advance the tip of the branch of the submodule to that commit? Do we know/require/care if such a move always fast-forwards?

Previous: Jens LehmannNext: W. Trevor King
Message 21 of 35 in “What's cooking in git.git (Jan 2014, #01; Mon, 6)”
  1. Junio C HamanoJan 6, 2014
  2. Francesco PrettoJan 6, 2014
  3. Junio C HamanoJan 6, 2014
  4. Francesco PrettoJan 6, 2014
  5. Jens LehmannJan 7, 2014
  6. 0/9 v2 submodule recursive checkout]Jens Lehmann, Feb 3, 2014
  7. 1/9 submodule: prepare for recursive checkout of submodulesJens Lehmann, Feb 3, 2014
  8. Junio C HamanoFeb 3, 2014
  9. Jens LehmannFeb 7, 2014
  10. Jonathan NiederFeb 4, 2014
  11. Jens LehmannFeb 7, 2014
  12. 2/9 Teach reset the --[no-]recurse-submodules optionJens Lehmann, Feb 3, 2014
  13. Junio C HamanoFeb 3, 2014
  14. Jens LehmannFeb 7, 2014
  15. 3/9 Teach checkout the --[no-]recurse-submodules optionJens Lehmann, Feb 3, 2014
  16. Junio C HamanoFeb 3, 2014
  17. Jens LehmannFeb 7, 2014
  18. 4/9 Teach merge the --[no-]recurse-submodules optionJens Lehmann, Feb 3, 2014
  19. Junio C HamanoFeb 3, 2014
  20. Jens LehmannFeb 7, 2014
  21. Junio C HamanoFeb 7, 2014
  22. W. Trevor KingFeb 7, 2014
  23. 5/9 Teach bisect--helper the --[no-]recurse-submodules optionJens Lehmann, Feb 3, 2014
  24. 6/9 Teach bisect the --[no-]recurse-submodules optionJens Lehmann, Feb 3, 2014
  25. W. Trevor KingFeb 3, 2014
  26. Jens LehmannFeb 3, 2014
  27. 7/9 submodule: teach unpack_trees() to remove submodule contentsJens Lehmann, Feb 3, 2014
  28. W. Trevor KingFeb 3, 2014
  29. Jens LehmannFeb 7, 2014
  30. 8/9 submodule: teach unpack_trees() to repopulate submodulesJens Lehmann, Feb 3, 2014
  31. 9/9 submodule: teach unpack_trees() to update submodulesJens Lehmann, Feb 3, 2014
  32. W. Trevor KingFeb 3, 2014
  33. Jens LehmannFeb 7, 2014
  34. Duy NguyenFeb 4, 2014
  35. Jens LehmannFeb 7, 2014

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.