diff options
author | Tay Ray Chuan <rctay89@gmail.com> | 2010-02-24 20:50:27 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-24 08:35:44 -0800 |
commit | 7838106925653e02b5c00ccb47a240c4c837c0f6 (patch) | |
tree | 2d94f3658c45ec3aa9ee656d651efcd7ef022bcd | |
parent | d01b3c02e8a066054c308ee2ce521a2ea44738d3 (diff) | |
download | git-7838106925653e02b5c00ccb47a240c4c837c0f6.tar.gz |
push: learn --progress
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Documentation/git-push.txt | 9 | ||||
-rw-r--r-- | builtin-push.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 22cff99b45..8d957244bd 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 dce3152fec..ba9fe49034 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() }; |