`submodule update --remote` fetches default branch instead of `submodule.*.branch`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

When I do

  git clone -j10 --depth=1 --branch=develop --no-tags --single-branch
--recurse-submodules --shallow-submodules --remote-submodules
https://github.com/boostorg/boost.git .

Or

  git clone --depth=1 --shallow-submodules --branch=develop
https://github.com/boostorg/boost.git .
  git submodule update --init --remote --checkout --recommend-shallow
--recursive --single-branch --jobs 10 --depth 1

I get the error:

  fatal: Unable to find current origin/develop revision in submodule
path 'libs/callable_traits'

In the trace I see that git clone is called without the
`--branch=develop` even though `git branch` reports `develop` and
`.gitmodules` sets 'branch = .' on every submodule.

  trace: built-in: git submodule--helper clone --require-init --path
libs/callable_traits --name callable_traits --url
https://github.com/boostorg/callable_traits.git --depth=1
--single-branch
  trace: built-in: git clone --no-checkout --depth 1
--separate-git-dir /home/nick/boost-repo/.git/modules/callable_traits
--single-branch -- https://github.com/boostorg/callable_traits.git
/home/nick/boost-repo/libs/callable_traits

I tried different versions:

  git version 2.34.1
  git version 2.39.2.windows.1
  git version 2.40.0.windows.1



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux