Bug? git push --recurse-submodules=on-demand is not truly recursive
- From
- Uwe 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
|
|-- BA 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