git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git submodule update --init breaks if run twice in parallel

From
GFGermán Ferrero <ferrero.gf@gmail.com>
Date
Oct 16, 2024, 18:49 UTC
Message-ID
<CAH08wSh7Jzn-RoziaEM3mDcEEQqcnKpnrSZKPTD9yn9BmZgQxw@mail.gmail.com>
In-Reply-To
<CAH08wShkp6Mnz5itcbT=GyCY7_dW5eQWLy0yBFS8njUHumpQZw@mail.gmail.com>

Sorry, it also happens on version 2.44.1, It just seems less likely. But if you try enough times you will get the same error.

I guess this is just the way it's supposed to work, and there's nothing to fix.
On Wed, Oct 16, 2024 at 10:07 AM Germán Ferrero <ferrero.gf@gmail.com> wrote:
Show 56 quoted lines
>
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> git submodule update --init & git submodule update --init
>
> What did you expect to happen? (Expected behavior)
> Something like:
> [1] 334031
> [1]+ Done git submodule update --init
>
> What happened instead? (Actual behavior)
> [1] 333889
> error: could not lock config file
> /path/to/my/repo/.git/modules/path/to/my/module/config: File exists
> fatal: could not set 'core.worktree' to '../../../../modules/path/to/my/module'
>
> What's different between what you expected and what actually happened?
> The difference is that in the expected behavior (working up to git
> 2.44.1 at least),
> I got no error by running in parallel git submodules update --init.
>
> Anything else you want to add:
> In our scenario git submodules update --init is command run by tasks
> that are schedulled
> potentially in parallel.
>
> Please review the rest of the bug report below.
> You can delete any lines you don't wish to share.
>
>
> [System Info]
> git version:
> git version 2.46.0
> cpu: x86_64
> no commit associated with this build
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
> libcurl: 8.9.1
> OpenSSL: OpenSSL 3.0.14 4 Jun 2024
> zlib: 1.3.1
> uname: Linux 6.8.4-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.4-2
> (2024-04-10T17:36Z) x86_64
> compiler info: gnuc: 13.3
> libc info: glibc: 2.39
> $SHELL (typically, interactive shell):
> /nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
>
>
> [Enabled Hooks]
>
>
> --
> Germán Francisco Ferrero.
-- 
Germán Francisco Ferrero.
Previous: Germán FerreroNext: Taylor Blau
Message 2 of 3 in “git submodule update --init breaks if run twice in parallel”
  1. Germán FerreroOct 16, 2024
  2. Germán FerreroOct 16, 2024
  3. Taylor BlauOct 16, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.