git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* `submodule update --remote` fetches default branch instead of `submodule.*.branch`
@ 2023-04-14 23:50 Nikita Kniazev
  0 siblings, 0 replies; only message in thread
From: Nikita Kniazev @ 2023-04-14 23:50 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-14 23:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14 23:50 `submodule update --remote` fetches default branch instead of `submodule.*.branch` Nikita Kniazev

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).