Re: git push --quiet is not quiet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 19, 2023 at 10:15:05AM +0200, Hanno Böck wrote:

> I believe this is a bug in git: According to the man page for git push,
> the -q/--quiet parameter should "Suppress all output".
> 
> However, it does not. To reproduce: Create a commit in a repo and run:
> git push -q
> remote: Resolving deltas: 100% (1/1), completed with 1 local object.

That message is coming from the remote side over the stderr sideband; we
don't interpret it locally, so we don't know whether it's a real error
or just chatter. We must pass it on to the user. So the bug is that the
remote side is showing progress output, even though we've asked for
--quiet.

That is usually handled by sending a "quiet" capability over the
protocol. E.g., if you do something like this:

  git init --bare dst.git
  GIT_TRACE_PACKET=1 git push dst.git HEAD

You should see the server advertise that it knows about the "quiet"
capability:

  packet:         push< 0000000000000000000000000000000000000000 capabilities^{}\0report-status report-status-v2 delete-refs side-band-64k quiet atomic ofs-delta object-format=sha1 agent=git/2.41.0.rc0.368.gaafabc8979

And then when the client responds, it asks for "quiet":

  packet:         push> 0000000000000000000000000000000000000000 b2f0a7f47f5f2aebe1e7fceff19a57de20a78c06 refs/heads/master\0 report-status-v2 side-band-64k quiet object-format=sha1 agent=git/2.41.0.rc0.368.gaafabc8979

What is your push destination? If you run your push with GIT_TRACE_PACKET=1
in the environment, does the other side say that it supports "quiet"?

As a guess, I wondered if you might be pushing to GitHub. And indeed,
they do not support quiet. Here's the advertisement from pushing to a
test repo over ssh:

  push< 60e3601d029e7e4ed799be13225cbc221d7d9894 refs/heads/main\0report-status report-status-v2 delete-refs side-band-64k ofs-delta atomic push-options object-format=sha1 agent=github/spokes-receive-pack-14212a8c32379761bfb7c8707291458d5acdd11e

So I think this is a bug / lack of feature in GitHub's server
implementation.  It used to be a thin proxy around Git (and Git has
supported "quiet" since c207e34f7733 in 2012). But I suspect they may
have recently replaced it with something more custom (based on the agent
field).

+cc a few relevant GitHubbers

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux