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

Re: git push --quiet is not quiet

From
Jeff King <peff@peff.net>
Date
May 19, 2023, 09:05 UTC
Message-ID
<20230519090559.GA3515410@coredump.intra.peff.net>
In-Reply-To
<20230519101505.416d0963.hanno@hboeck.de>
On Fri, May 19, 2023 at 10:15:05AM +0200, Hanno Böck wrote:
Show 6 quoted lines
> 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
Previous: Kristoffer HaugsbakkNext: Hanno Böck
Message 3 of 7 in “git push --quiet is not quiet”
  1. Hanno BöckMay 19, 2023
  2. Kristoffer HaugsbakkMay 19, 2023
  3. Jeff KingMay 19, 2023
  4. Hanno BöckMay 19, 2023
  5. Jeff KingMay 19, 2023
  6. Taylor BlauJun 5, 2023
  7. Jeff KingJun 6, 2023

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.