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

Re: [PATCH 3/3] transport: don't show push status if --quiet is given

From
Jeff King <peff@peff.net>
Date
Aug 31, 2009, 19:28 UTC
Message-ID
<20090831192834.GC4876@sigill.intra.peff.net>
In-Reply-To
<4A9C175E.6020905@hartwork.org>
On Mon, Aug 31, 2009 at 08:33:02PM +0200, Sebastian Pipping wrote:
Show 6 quoted lines
> I run git push in a cron job, too.  I want mails in error cases only
> so I need git push to print errors but _only_ errors to stderr.  That
> seems impossible with 1.6.4.* and related to what you're discussing here.
> 
> Does the patch you're building address that case already?  has it been
> applied to any branch already?  I got a bit lost in this thread, sorry.

Junio applied the series, and it is in 'master' right now (and so should be part of the upcoming 1.6.5).

Using "git push -q" will do what you want, but playing with it a bit, I think there is one bit missing from the original series:

-- >8 --
Subject: [PATCH] push: teach --quiet to suppress "Everything up-to-date"

This should have been part of 481c7a6, whose goal was to make "git push -q" silent unless there is an error.

Signed-off-by: Jeff King <peff@peff.net>
---
 transport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/transport.c b/transport.c
index ce91387..f2bd998 100644
--- a/transport.c
+++ b/transport.c
@@ -908,7 +908,7 @@ int transport_push(struct transport *transport,
 				update_tracking_ref(transport->remote, ref, verbose);
 		}
 
-		if (!ret && !refs_pushed(remote_refs))
+		if (!quiet && !ret && !refs_pushed(remote_refs))
 			fprintf(stderr, "Everything up-to-date\n");
 		return ret;
 	}
-- 
1.6.4.2.372.gf7961.dirty
Previous: Sebastian PippingNext: Sebastian Pipping
Message 18 of 19 in “Making git push output quieter”
  1. Albert Astals CidAug 4, 2009
  2. Pau Garcia i QuilesAug 4, 2009
  3. Albert Astals CidAug 5, 2009
  4. Shawn O. PearceAug 5, 2009
  5. Nicolas PitreAug 5, 2009
  6. Jeff KingAug 5, 2009
  7. 1/3 push: add --quiet flagJeff King, Aug 5, 2009
  8. 2/3 transport: pass "quiet" flag to pack-objectsJeff King, Aug 5, 2009
  9. 3/3 transport: don't show push status if --quiet is givenJeff King, Aug 5, 2009
  10. Sverre RabbelierAug 5, 2009
  11. Avery PennarunAug 5, 2009
  12. Sverre RabbelierAug 5, 2009
  13. Junio C HamanoAug 5, 2009
  14. Jeff KingAug 5, 2009
  15. Junio C HamanoAug 5, 2009
  16. Jeff KingAug 5, 2009
  17. Sebastian PippingAug 31, 2009
  18. Jeff KingAug 31, 2009
  19. Sebastian PippingAug 31, 2009

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.