gil icon indicating copy to clipboard operation
gil copied to clipboard

infinite unstaged changes because of recursive submodules

Open andry81 opened this issue 2 years ago • 1 comments

Another may be issued here of recursed submodules w/o links creation is that you can never make them always up to date pointing the last commit. One of submodules would always be out of date pointing the previous commit.

A -> B
B -> A

The gil pull on A will make unstaged changes for it. Then, the A push make the B out of date. The git pull on B will make unstaged changes for it. Then, the B push make the A out of date. And so on..

So in case of looped submodules, one will always has unstaged changes.

andry81 avatar Jan 08 '23 07:01 andry81

To test:

https://github.com/andry81-tests/gil-test1-A https://github.com/andry81-tests/gil-test1-B

If call gil update first time from not Administrator console:

  • There always shall be unstaged changes.

If call gil update first time from Administrator console:

  • The gil status, git status, git commit from any console (from Administrator console particularly for gil status there would be 3 recursive call lists instead of 1 as from not Administrator console) shall fall into infinite recursion: https://github.com/chronoxor/gil/issues/9
  • The gil pull, gil status from not Administrator console shall report fatal: detected dubious ownership in repository at '...': https://github.com/chronoxor/gil/issues/8

andry81 avatar Jan 08 '23 08:01 andry81