BobBuildTool / bob

Bob build tool - Functional cross platform build-automation tool
https://bobbuildtool.dev/
GNU General Public License v3.0
73 stars 44 forks source link

testSubSubmoduleUpdateSwitched failing locally #568

Closed rhubert closed 3 months ago

rhubert commented 3 months ago

Describe the bug

On my local machine the test_input_gitscm was always failing with:

   586  ======================================================================
   587  FAIL: testSubSubmoduleUpdateSwitched (test_input_gitscm.TestSubmodules.testSubSubmoduleUpdateSwitched)
   588  Test update of switched sub-submodule
   589  ----------------------------------------------------------------------
   590  Traceback (most recent call last):
   591    File "/home/ralf/projects/bob/test/unit/test_input_gitscm.py", line 836, in testSubSubmoduleUpdateSwitched
   592      self.assertFalse(os.path.exists(os.path.join(workspace, "sub1/some/deep/path/canary.txt")))
   593  AssertionError: True is not false

It took me some time to find out this was due to a setting in my ~/.gitconfig:

[submodule]    
    recurse = true

which I have there to automatically update the layer-submodules...

I fear this could also lead to different checkout results?

Steps to reproduce

$ git config --global submodule.recurse true
$ ./test/run-tests.sh -u test_input_gitscm

Context

jkloetzke commented 3 months ago

Hmm, this should not happen. Indeed, that could have lead to inconsistent checkout results. Looks like -c submodule.recurse=0 is missing on some git calls.

Actually I'm wondering how many other options exist that could lead to inconsistent checkouts.