{"thread":{"id":"59600","subject":"`submodule update --remote` fetches default branch instead of `submodule.*.branch`","startedAt":"2023-04-14T23:52:39Z","lastAt":"2023-04-14T23:52:39Z","messageCount":1,"participants":["Nikita Kniazev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"475429","messageId":"CAPFiOxax-=PRUBCSOPH=9=UpERQLEJw+pO1Pg+JndM63JyGDAw@mail.gmail.com","threadId":"59600","inReplyTo":null,"subject":"`submodule update --remote` fetches default branch instead of `submodule.*.branch`","fromName":"Nikita Kniazev","fromEmail":"nok.raven@gmail.com","sentAt":"2023-04-14T23:50:35Z","receivedAt":"2023-04-14T23:52:39Z","isPatch":false,"sender":{"key":"nok.raven@gmail.com","avatar":null},"body":"Hello,\n\nWhen I do\n\n  git clone -j10 --depth=1 --branch=develop --no-tags --single-branch\n--recurse-submodules --shallow-submodules --remote-submodules\nhttps://github.com/boostorg/boost.git .\n\nOr\n\n  git clone --depth=1 --shallow-submodules --branch=develop\nhttps://github.com/boostorg/boost.git .\n  git submodule update --init --remote --checkout --recommend-shallow\n--recursive --single-branch --jobs 10 --depth 1\n\nI get the error:\n\n  fatal: Unable to find current origin/develop revision in submodule\npath 'libs/callable_traits'\n\nIn the trace I see that git clone is called without the\n`--branch=develop` even though `git branch` reports `develop` and\n`.gitmodules` sets 'branch = .' on every submodule.\n\n  trace: built-in: git submodule--helper clone --require-init --path\nlibs/callable_traits --name callable_traits --url\nhttps://github.com/boostorg/callable_traits.git --depth=1\n--single-branch\n  trace: built-in: git clone --no-checkout --depth 1\n--separate-git-dir /home/nick/boost-repo/.git/modules/callable_traits\n--single-branch -- https://github.com/boostorg/callable_traits.git\n/home/nick/boost-repo/libs/callable_traits\n\nI tried different versions:\n\n  git version 2.34.1\n  git version 2.39.2.windows.1\n  git version 2.40.0.windows.1\n"}]}