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

Bug? git push --recurse-submodules=on-demand is not truly recursive

From
USUwe Sommerlatt <uwe.sommerlatt@gmail.com>
Date
Mar 24, 2015, 12:50 UTC
Message-ID
<CAGt=MzCkB66K9L6gahUTH3cWafW8psNQYw3d8UKFFy5C+MUZcA@mail.gmail.com>
I have the following project structure:
root-project
      |
      |-- A
      |   |
      |   |-- C
      |
      |-- B

A and B are submodules of the root-project. C is in turn a submodule of project A. Suppose I have made changes to projects A,B and C and commited these changes to the respective indices. After that I update the references to A and B in the root-project and commit that change as well. When I push the commit of the root-project with the option --recurse-submodules=on-demand, git pushes the commits of projects A, B and the root-project but silently ignores all unpublished commits of project C. I end up publishing a project that no one can successfully clone because of the dangling link to C. Is this the expected behaviour or is this a bug?

I have written a small shell script that sets up the project structure and executes the described scenario: https://gist.github.com/usommerl/6e8defcba94bd4ba1438

git version 2.3.3
Uwe Sommerlatt
Message 1 of 1 in “Bug? git push --recurse-submodules=on-demand is not truly recursive”
  1. Uwe SommerlattMar 24, 2015

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.