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

[PATCH 07/10] push: learn --progress

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Feb 18, 2010, 12:37 UTC
Message-ID
<1266496631-3980-8-git-send-email-rctay89@gmail.com>
In-Reply-To
<1266496631-3980-1-git-send-email-rctay89@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 Documentation/git-push.txt |    9 ++++++++-
 builtin-push.c             |    4 +++-
 2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 22cff99..8d95724 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -148,12 +148,19 @@ useful if you write an alias or script around 'git push'.
 -q::
 --quiet::
 	Suppress all output, including the listing of updated refs,
-	unless an error occurs.
+	unless an error occurs. Progress is not reported to the standard
+	error stream.
 
 -v::
 --verbose::
 	Run verbosely.
 
+--progress::
+	Progress status is reported on the standard error stream
+	by default when it is attached to a terminal, unless -q
+	is specified. This flag forces progress status even if the
+	standard error stream is not directed to a terminal.
+
 include::urls-remotes.txt[]
 
 OUTPUT
diff --git a/builtin-push.c b/builtin-push.c
index dce3152..ba9fe49 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -18,6 +18,7 @@ static int thin;
 static int deleterefs;
 static const char *receivepack;
 static int verbosity;
+static int progress;
 
 static const char **refspec;
 static int refspec_nr;
@@ -107,7 +108,7 @@ static int push_with_options(struct transport *transport, int flags)
 	int err;
 	int nonfastforward;
 
-	transport_set_verbosity(transport, verbosity, 0);
+	transport_set_verbosity(transport, verbosity, progress);
 
 	if (receivepack)
 		transport_set_option(transport,
@@ -223,6 +224,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
 		OPT_STRING( 0 , "exec", &receivepack, "receive-pack", "receive pack program"),
 		OPT_BIT('u', "set-upstream", &flags, "set upstream for git pull/status",
 			TRANSPORT_PUSH_SET_UPSTREAM),
+		OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"),
 		OPT_END()
 	};
 
-- 
1.7.0.27.g5d71b
Previous: Tay Ray ChuanNext: Tay Ray Chuan
Message 10 of 16 in “teach --progress to transport-related builtins”
  1. 00/10 teach --progress to transport-related builtinsTay Ray Chuan, Feb 18, 2010
  2. 01/10 Documentation/git-pull.txt: mention --quiet and --verbose for fetchingTay Ray Chuan, Feb 18, 2010
  3. Junio C HamanoFeb 18, 2010
  4. Tay Ray ChuanFeb 19, 2010
  5. 02/10 Documentation/git-push.txt: put --quiet before --verboseTay Ray Chuan, Feb 18, 2010
  6. 03/10 fetch: refactor verbosity option handling into transport.[ch]Tay Ray Chuan, Feb 18, 2010
  7. 04/10 push: support multiple levels of verbosityTay Ray Chuan, Feb 18, 2010
  8. 05/10 clone: support multiple levels of verbosityTay Ray Chuan, Feb 18, 2010
  9. 06/10 transport->progress: use flag authoritativelyTay Ray Chuan, Feb 18, 2010
  10. 07/10 push: learn --progressTay Ray Chuan, Feb 18, 2010
  11. 08/10 fetch: learn --progressTay Ray Chuan, Feb 18, 2010
  12. 09/10 pull: learn --progressTay Ray Chuan, Feb 18, 2010
  13. 10/10 transport: update flags to be in running orderTay Ray Chuan, Feb 18, 2010
  14. Junio C HamanoFeb 19, 2010
  15. Tay Ray ChuanFeb 19, 2010
  16. Jeff KingFeb 19, 2010

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.