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

Re: Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules)

From
Ping Yin <pkufranky@gmail.com>
Date
May 1, 2008, 04:56 UTC
Message-ID
<46dff0320804302156w7ed0e139pae171fa51a9e8cb8@mail.gmail.com>
In-Reply-To
<BC221793-3FB5-4249-8E8D-819C1B413592@gmail.com>
On Thu, May 1, 2008 at 4:19 AM, Tim Harper <timcharper@gmail.com> wrote:
Show 7 quoted lines
>
>  I could see an issue if you changed the submodule version, and forgot to
> commit the version change in your super project, and then switched branches,
> and lost your version change.  Perhaps the correct behavior in this case
> would be to only automatically update the submodule version if it didn't
> differ from the superproject version in the "from" branch.
>

Agree. Doing this will make submodule be more consistent with the ordinary file. Further, when switching to another branch with diffrent recorded commit about the submodule and the submodule in the from branch has been modified, just refuse to switch because this can be considered a conflict and there is no easy way to merge.

-- 
Ping Yin
Previous: Roman Shaposhnik
Message 22 of 22 in “Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules)”
  1. Tim HarperApr 30, 2008
  2. Tim HarperApr 30, 2008
  3. Andreas EricssonApr 30, 2008
  4. Johannes SchindelinApr 30, 2008
  5. Avery PennarunApr 30, 2008
  6. Ping YinApr 30, 2008
  7. Roman ShaposhnikApr 30, 2008
  8. Avery PennarunApr 30, 2008
  9. Tim HarperApr 30, 2008
  10. Avery PennarunApr 30, 2008
  11. Tim HarperApr 30, 2008
  12. Avery PennarunApr 30, 2008
  13. Roman ShaposhnikApr 30, 2008
  14. Avery PennarunApr 30, 2008
  15. Finn Arne GangstadMay 1, 2008
  16. Avery PennarunMay 1, 2008
  17. Roman ShaposhnikMay 6, 2008
  18. Avery PennarunMay 7, 2008
  19. Ping YinMay 8, 2008
  20. Steven GrimmMay 1, 2008
  21. Roman ShaposhnikMay 6, 2008
  22. Ping YinMay 1, 2008

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.