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

[RFC/PATCH 1/3] push: add --quiet flag

From
Jeff King <peff@peff.net>
Date
Aug 5, 2009, 20:22 UTC
Message-ID
<20090805202219.GA23226@coredump.intra.peff.net>
In-Reply-To
<20090805201937.GB9004@coredump.intra.peff.net>

Some transports produce output even without "--verbose" turned on. This provides a way to tell them to be more quiet (whereas simply redirecting might lose error messages).

Signed-off-by: Jeff King <peff@peff.net>
---
Missing tests and docs still.

It may be a bit weird, but you can actually say "--quiet --verbose" and they don't exactly cancel each other. But it can actually be useful to say "don't show me the ref status unless there is an error (--quiet), in which case show me the entire table (--verbose)".

 builtin-push.c |    1 +
 transport.h    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/builtin-push.c b/builtin-push.c
index 1d92e22..bc0c91a 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -168,6 +168,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
 	const char *repo = NULL;	/* default repository */
 
 	struct option options[] = {
+		OPT_BIT('q', "quiet", &flags, "be quiet", TRANSPORT_PUSH_QUIET),
 		OPT_BIT('v', "verbose", &flags, "be verbose", TRANSPORT_PUSH_VERBOSE),
 		OPT_STRING( 0 , "repo", &repo, "repository", "repository"),
 		OPT_BIT( 0 , "all", &flags, "push all refs", TRANSPORT_PUSH_ALL),
diff --git a/transport.h b/transport.h
index 51b5397..f1d3ebf 100644
--- a/transport.h
+++ b/transport.h
@@ -36,6 +36,7 @@ struct transport {
 #define TRANSPORT_PUSH_MIRROR 8
 #define TRANSPORT_PUSH_VERBOSE 16
 #define TRANSPORT_PUSH_PORCELAIN 32
+#define TRANSPORT_PUSH_QUIET 64
 
 /* Returns a transport suitable for the url */
 struct transport *transport_get(struct remote *, const char *);
-- 
1.6.4.218.g9f65c.dirty
Previous: Jeff KingNext: Jeff King
Message 7 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.