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

1 messages from 2015-03-24 to 2015-03-24. Participants: Uwe Sommerlatt.
Thread: https://gitlist.dev/t/38903

## Uwe Sommerlatt, 2015-03-24 12:50

Subject: Bug? git push --recurse-submodules=on-demand is not truly recursive
Message-ID: <CAGt=MzCkB66K9L6gahUTH3cWafW8psNQYw3d8UKFFy5C+MUZcA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGt%3DMzCkB66K9L6gahUTH3cWafW8psNQYw3d8UKFFy5C%2BMUZcA%40mail.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

```
