I did a bunch more investigation: My original problem was that it would work on a terminal, but not when running under jenkins. Turns out the “-v” in the "index-pack” step is whats leading to the error. I can reproduce the issue with the command "git submodule update --init --recursive > out.txt 2>&1" It seems that the “-v” is dropped automatically by git if its not connected to a terminal. This is only an issue for “git://“ urls. ssh and https seem to not be affected. > On 22 Mar 2016, at 16:02, Marcus T <maddimax@xxxxxxxxxxxxxx> wrote: > > Hello, > > I’m running into a nasty issue where “git submodule update —init” fails if I add “—quiet” > > Following you can find the output with GIT_TRACE=1: > > WITHOUT --quiet: > > GIT_TRACE=1 git submodule update --init --recursive > 15:51:48.248945 git.c:561 trace: exec: 'git-submodule' 'update' '--init' '--recursive' > 15:51:48.249023 run-command.c:334 trace: run_command: 'git-submodule' 'update' '--init' '--recursive' > 15:51:48.256626 git.c:344 trace: built-in: git 'rev-parse' '--git-dir' > 15:51:48.258494 git.c:344 trace: built-in: git 'rev-parse' '--git-path' 'objects' > 15:51:48.260406 git.c:344 trace: built-in: git 'rev-parse' '-q' '--git-dir' > 15:51:48.262940 git.c:344 trace: built-in: git 'rev-parse' '--show-prefix' > 15:51:48.264156 git.c:344 trace: built-in: git 'rev-parse' '--show-toplevel' > 15:51:48.266637 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' > 15:51:48.268074 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' > 15:51:48.269913 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' > 15:51:48.271168 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update' > 15:51:48.272422 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'dl' > 15:51:48.274179 git.c:344 trace: built-in: git 'config' 'submodule.dl.url' > 15:51:48.275445 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update' > 15:51:48.276779 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' > 15:51:48.278362 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' > 15:51:48.279819 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' > 15:51:48.281192 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.branch' > 15:51:48.282473 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch' > 15:51:48.283788 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.update' > 15:51:48.285269 git.c:344 trace: built-in: git 'submodule--helper' 'clone' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' '' > 15:51:48.285337 run-command.c:334 trace: run_command: 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' > 15:51:48.285687 exec_cmd.c:120 trace: exec: 'git' 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' > 15:51:48.286453 git.c:344 trace: built-in: git 'clone' '--no-checkout' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' > Cloning into 'buildroot'... > 15:51:49.177856 run-command.c:334 trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected' > 15:51:49.178244 exec_cmd.c:120 trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected' > 15:51:49.179806 git.c:344 trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 15895 on bre-build-linux' '--check-self-contained-and-connected' > remote: Counting objects: 200277, done. > remote: Compressing objects: 100% (62420/62420), done. > ... > > WITH --quite: > > GIT_TRACE=1 git submodule update --init --recursive --quiet > 15:52:26.900568 git.c:561 trace: exec: 'git-submodule' 'update' '--init' '--recursive' '--quiet' > 15:52:26.900652 run-command.c:334 trace: run_command: 'git-submodule' 'update' '--init' '--recursive' '--quiet' > 15:52:26.907761 git.c:344 trace: built-in: git 'rev-parse' '--git-dir' > 15:52:26.909877 git.c:344 trace: built-in: git 'rev-parse' '--git-path' 'objects' > 15:52:26.911766 git.c:344 trace: built-in: git 'rev-parse' '-q' '--git-dir' > 15:52:26.914279 git.c:344 trace: built-in: git 'rev-parse' '--show-prefix' > 15:52:26.915488 git.c:344 trace: built-in: git 'rev-parse' '--show-toplevel' > 15:52:26.917983 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' > 15:52:26.919504 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' > 15:52:26.921244 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' > 15:52:26.922619 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.update' > 15:52:26.923888 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'dl' > 15:52:26.925650 git.c:344 trace: built-in: git 'config' 'submodule.dl.url' > 15:52:26.926892 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.dl.update' > 15:52:26.928230 git.c:344 trace: built-in: git 'submodule--helper' 'list' '--prefix' '' > 15:52:26.929709 git.c:344 trace: built-in: git 'submodule--helper' 'name' 'buildroot' > 15:52:26.931220 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.url' > 15:52:26.932597 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.branch' > 15:52:26.933867 git.c:344 trace: built-in: git 'config' '-f' '.gitmodules' 'submodule.buildroot.branch' > 15:52:26.935170 git.c:344 trace: built-in: git 'config' 'submodule.buildroot.update' > 15:52:26.936660 git.c:344 trace: built-in: git 'submodule--helper' 'clone' '--quiet' '--prefix' '' '--path' 'buildroot' '--name' 'buildroot' '--url' 'git://git.busybox.net/buildroot' '' '' > 15:52:26.936732 run-command.c:334 trace: run_command: 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' > 15:52:26.936965 exec_cmd.c:120 trace: exec: 'git' 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' > 15:52:26.937803 git.c:344 trace: built-in: git 'clone' '--no-checkout' '--quiet' '--separate-git-dir' '.git/modules/buildroot' 'git://git.busybox.net/buildroot' 'buildroot' > 15:52:27.958503 run-command.c:334 trace: run_command: 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected' > 15:52:27.958870 exec_cmd.c:120 trace: exec: 'git' 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected' > 15:52:27.960447 git.c:344 trace: built-in: git 'index-pack' '--stdin' '--fix-thin' '--keep=fetch-pack 15936 on bre-build-linux' '--check-self-contained-and-connected' > fatal: The remote end hung up unexpectedly > fatal: early EOF > fatal: index-pack failed > fatal: clone of 'git://git.busybox.net/buildroot' into submodule path 'buildroot' failed > > --------- > git --version > git version 2.7.4 > > Any help in tracking down the reason for this would be greatly appreciated. > > Thanks, > Marcus >
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail