Git push -recurse-submodules = on-demand is not really recursive

I have the following project structure:

root-project
      |
      |-- A
      |   |
      |   |-- C
      |
      |-- B

A and B are submodules of the root project. C, in turn, is a submodule of project A. Suppose I made changes to projects A, B and C and these changes were made to the corresponding indexes. After that, I update the links to A and B in the root project and commit this change as well. When I push changes to the root project using the --recurse-submodules = on-demand option, git pushes all the commits of projects A, B and the root project, but silently ignores project C. I expect it to push the changes to project C.

I know that I can get around this problem by using the following two commands in the root project folder.

git submodule foreach --recursive 'git push origin master'
git push

- , - git -push.I git, : http://thread.gmane.org/gmane.comp.version-control.git/266184

script, push: https://gist.github.com/usommerl/6e8defcba94bd4ba1438

git 2.3.3

+4
1

git push --recurse-submodules=on-demand git 2.14.x/2.15 (Q3 2017), .

. commit c7be720 (20 2017 .) (mbrandonw).
( Junio ​​C Hamano - gitster - a49794d, 22 2017 )

- : push-check HEAD

06bf4ad (push: refspec --recurse-subodules, git 2.13.0) push , refspec , <<24 > .

refspec, , , ref, , , , "HEAD" .

push-check ( , , refspec ), "HEAD" , :

  • .
+1

All Articles