git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Marcus T <maddimax@googlemail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git fails updating submodule only if --quiet is specified
Date: Tue, 22 Mar 2016 11:22:24 -0700	[thread overview]
Message-ID: <CAGZ79kZaV3w5TM+FPORcFOdeCY8idCYV_yB4Vt5eSNVrNomp2w@mail.gmail.com> (raw)
In-Reply-To: <219B1DC5-8379-4FD5-8739-D99890362769@googlemail.com>

On Tue, Mar 22, 2016 at 8:51 AM, Marcus T <maddimax@googlemail.com> wrote:

git submodule was partially rewritten in v2.7 so I would assume that
is some fallout from
there. (passing the wrong arguments at the wrong time/place)

However lookingat your logs, I would suspect it is an error in git
clone instead, as that is the
last command which has the --quiet flag passed through the stack.


> 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.

That is what the transport protocol determines at
https://github.com/git/git/blob/master/transport.c#L743

I would expect that index-pack just works without -v instead of crashing.

>
>
>
>> On 22 Mar 2016, at 16:02, Marcus T <maddimax@googlemail.com> 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
>>
>

  reply	other threads:[~2016-03-22 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 15:02 git fails updating submodule only if --quiet is specified Marcus T
2016-03-22 15:51 ` Marcus T
2016-03-22 18:22   ` Stefan Beller [this message]
2016-03-22 21:38     ` Stefan Beller
2016-03-22 21:43       ` Stefan Beller
     [not found]         ` <CALgWkErHQ=coXRpzxY0jQoAN1pM-X9-UbPQUbNE56xhnb2VHfg@mail.gmail.com>
2016-03-22 22:02           ` Stefan Beller
2016-03-22 22:25       ` Jeff King
2016-03-22 22:35         ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGZ79kZaV3w5TM+FPORcFOdeCY8idCYV_yB4Vt5eSNVrNomp2w@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=maddimax@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).