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

Git submodule update and the --merge flag when submodule is yet to be checked out

From
Carl Fürstenberg <azatoth@gmail.com>
Date
Mar 18, 2011, 18:25 UTC
Message-ID
<AANLkTikJo_pjSAmVV3wjWi04io4zWb-_P5p81TYj9tq6@mail.gmail.com>

Sorry for re-posting the question but I though I should explain the issue better and to fix the subject line. sub When you are cloning repository containing submodules, and you are using the --merge flag to "git submodule update" the first time, then the submodule instance in question will assume you want to delete all files present in the module.

Please look at attachment for a testcase and how the result might look like. Unless this is not the intended behavior, then I would suggest changing --merge (and possible --rebase) to not assume a non-existent repository to be a empty one.

The man pages says "Merge the commit recorded in the superproject into the current branch of the submodule", but we have no current branch of the submodule.

I would be happy for any reply, and sorry again for the repost.
/Carl Fürstenberg
Next: Junio C Hamano
Message 1 of 5 in “Git submodule update and the --merge flag when submodule is yet to be checked out”
  1. Carl FürstenbergMar 18, 2011
  2. Junio C HamanoMar 18, 2011
  3. Carl FürstenbergMar 18, 2011
  4. Spencer E. OlsonMar 18, 2011
  5. Junio C HamanoMar 18, 2011

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.