git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug: submodule update fails to fetch
@ 2023-06-22 11:09 Sergei Golubchik
  2023-06-22 13:07 ` Taylor Blau
  2024-10-01  7:24 ` [PATCH] submodule: correct remote name with fetch Daniel Black
  0 siblings, 2 replies; 12+ messages in thread
From: Sergei Golubchik @ 2023-06-22 11:09 UTC (permalink / raw)
  To: git

Hi,

Sometimes (my local repository has lots of branches) after switching
branches

  git submodule update --init --recursive

fails with something like

  fatal: transport 'file' not allowed
  fatal: Fetched in submodule path 'wsrep-lib', but it did not contain e238c0d240c2557229b0523a4a032f3cf8b41639. Direct fetching of that commit failed.

the submodule transport is not 'file' (it's https) and the direct
fetching of the commit actually works:

  cd wsrep-lib
  git fetch origin e238c0d240c2557229b0523a4a032f3cf8b41639
  git checkout e238c0d240c2557229b0523a4a032f3cf8b41639
  cd ..

after that

  git submodule update --init --recursive

succeeds. This happens deterministically, but depends on the old and new
commits in the last checkout. As a workaround we've had to change our CI to do

  git submodule foreach --recursive 'git fetch origin $sha1;git checkout --force FETCH_HEAD'

This is the bit from `git bugreport`:

[System Info]
git version:
git version 2.39.3
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.15.88-gentoo #1 SMP Wed Feb 15 16:42:45 CET 2023 x86_64
compiler info: gnuc: 11.3
libc info: glibc: 2.36
$SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks]

Regards,
Sergei

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-10-09 17:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-22 11:09 bug: submodule update fails to fetch Sergei Golubchik
2023-06-22 13:07 ` Taylor Blau
2023-06-22 16:39   ` Sergei Golubchik
2023-06-23  7:26     ` Jacob Keller
2024-10-01  7:24 ` [PATCH] submodule: correct remote name with fetch Daniel Black
2024-10-01 17:27   ` Junio C Hamano
2024-10-01 17:34     ` Junio C Hamano
2024-10-08  1:49       ` Daniel Black
2024-10-08  1:49         ` [RFC PATCH v2] submodule: correct remote name with fetch Daniel Black
2024-10-08 19:23           ` Junio C Hamano
2024-10-09  3:32             ` [PATCH v3] " Daniel Black
2024-10-09 17:51               ` Junio C Hamano

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 NNTP newsgroup(s).