{"thread":{"id":"62346","subject":"git submodule update --init breaks if run twice in parallel","startedAt":"2024-10-16T13:07:48Z","lastAt":"2024-10-16T19:35:51Z","messageCount":3,"participants":["Germán Ferrero","Taylor Blau"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"505262","messageId":"CAH08wShkp6Mnz5itcbT=GyCY7_dW5eQWLy0yBFS8njUHumpQZw@mail.gmail.com","threadId":"62346","inReplyTo":null,"subject":"git submodule update --init breaks if run twice in parallel","fromName":"Germán Ferrero","fromEmail":"ferrero.gf@gmail.com","sentAt":"2024-10-16T13:07:36Z","receivedAt":"2024-10-16T13:07:48Z","isPatch":false,"sender":{"key":"ferrero.gf@gmail.com","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\ngit submodule update --init & git submodule update --init\n\nWhat did you expect to happen? (Expected behavior)\nSomething like:\n[1] 334031\n[1]+ Done git submodule update --init\n\nWhat happened instead? (Actual behavior)\n[1] 333889\nerror: could not lock config file\n/path/to/my/repo/.git/modules/path/to/my/module/config: File exists\nfatal: could not set 'core.worktree' to '../../../../modules/path/to/my/module'\n\nWhat's different between what you expected and what actually happened?\nThe difference is that in the expected behavior (working up to git\n2.44.1 at least),\nI got no error by running in parallel git submodules update --init.\n\nAnything else you want to add:\nIn our scenario git submodules update --init is command run by tasks\nthat are schedulled\npotentially in parallel.\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.46.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash\nlibcurl: 8.9.1\nOpenSSL: OpenSSL 3.0.14 4 Jun 2024\nzlib: 1.3.1\nuname: Linux 6.8.4-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.4-2\n(2024-04-10T17:36Z) x86_64\ncompiler info: gnuc: 13.3\nlibc info: glibc: 2.39\n$SHELL (typically, interactive shell):\n/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash\n\n\n[Enabled Hooks]\n\n\n-- \nGermán Francisco Ferrero.\n"},{"id":"505281","messageId":"CAH08wSh7Jzn-RoziaEM3mDcEEQqcnKpnrSZKPTD9yn9BmZgQxw@mail.gmail.com","threadId":"62346","inReplyTo":"CAH08wShkp6Mnz5itcbT=GyCY7_dW5eQWLy0yBFS8njUHumpQZw@mail.gmail.com","subject":"Re: git submodule update --init breaks if run twice in parallel","fromName":"Germán Ferrero","fromEmail":"ferrero.gf@gmail.com","sentAt":"2024-10-16T18:49:02Z","receivedAt":"2024-10-16T18:49:15Z","isPatch":false,"sender":{"key":"ferrero.gf@gmail.com","avatar":null},"body":"Sorry, it also happens on version 2.44.1, It just seems less likely.\nBut if you try enough times you will get the same error.\n\nI guess this is just the way it's supposed to work, and there's nothing to fix.\n\nOn Wed, Oct 16, 2024 at 10:07 AM Germán Ferrero <ferrero.gf@gmail.com> wrote:\n>\n> Thank you for filling out a Git bug report!\n> Please answer the following questions to help us understand your issue.\n>\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> git submodule update --init & git submodule update --init\n>\n> What did you expect to happen? (Expected behavior)\n> Something like:\n> [1] 334031\n> [1]+ Done git submodule update --init\n>\n> What happened instead? (Actual behavior)\n> [1] 333889\n> error: could not lock config file\n> /path/to/my/repo/.git/modules/path/to/my/module/config: File exists\n> fatal: could not set 'core.worktree' to '../../../../modules/path/to/my/module'\n>\n> What's different between what you expected and what actually happened?\n> The difference is that in the expected behavior (working up to git\n> 2.44.1 at least),\n> I got no error by running in parallel git submodules update --init.\n>\n> Anything else you want to add:\n> In our scenario git submodules update --init is command run by tasks\n> that are schedulled\n> potentially in parallel.\n>\n> Please review the rest of the bug report below.\n> You can delete any lines you don't wish to share.\n>\n>\n> [System Info]\n> git version:\n> git version 2.46.0\n> cpu: x86_64\n> no commit associated with this build\n> sizeof-long: 8\n> sizeof-size_t: 8\n> shell-path: /nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash\n> libcurl: 8.9.1\n> OpenSSL: OpenSSL 3.0.14 4 Jun 2024\n> zlib: 1.3.1\n> uname: Linux 6.8.4-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.4-2\n> (2024-04-10T17:36Z) x86_64\n> compiler info: gnuc: 13.3\n> libc info: glibc: 2.39\n> $SHELL (typically, interactive shell):\n> /nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash\n>\n>\n> [Enabled Hooks]\n>\n>\n> --\n> Germán Francisco Ferrero.\n\n\n\n-- \nGermán Francisco Ferrero.\n"},{"id":"505290","messageId":"ZxAVlDuT3IFajqFp@nand.local","threadId":"62346","inReplyTo":"CAH08wSh7Jzn-RoziaEM3mDcEEQqcnKpnrSZKPTD9yn9BmZgQxw@mail.gmail.com","subject":"Re: git submodule update --init breaks if run twice in parallel","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-16T19:35:48Z","receivedAt":"2024-10-16T19:35:51Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Wed, Oct 16, 2024 at 03:49:02PM -0300, Germán Ferrero wrote:\n> Sorry, it also happens on version 2.44.1, It just seems less likely.\n> But if you try enough times you will get the same error.\n>\n> I guess this is just the way it's supposed to work, and there's nothing to fix.\n\nYeah, I suppose the error message:\n\n> > error: could not lock config file\n> > /path/to/my/repo/.git/modules/path/to/my/module/config: File exists\n> > fatal: could not set 'core.worktree' to '../../../../modules/path/to/my/module'\n\ncould be a little friendlier, but I agree that this appears to be\nworking as expected.\n\nThanks,\nTaylor\n"}]}