Failed clone: reference is not a tree
The way submodules are used is incorrect.
On git clone --recursive
, commit https://gitlab.com/wg1/jpeg-xl/-/tree/9e183e156cbb9d31821ef1c79641afc834bf71b4/third_party:
fatal: reference is not a tree: baca8abcfa9576d1682e049c46c4805230aeda5b
Unable to checkout baca8abcfa9576d1682e049c46c4805230aeda5b from https://github.com/meganz/mingw-std-threads.
This is what happens when one pins a commit in a submodule that is not part of a branch/tag on the remote repo.
E.g. in this case https://github.com/meganz/mingw-std-threads/commit/baca8abcfa9576d1682e049c46c4805230aeda5b shows This commit does not belong to any branch on this repository.
Github will show it, but git will fail to clone.
It's usually best practice to always make a branch or tag for commits one references in submodules.