push: learn --progress
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tay Ray Chuan committed
Feb 24, 2010 at 20:50 UTC
7838106925653e02b5c00ccb47a240c4c837c0f6
2 files changed
+11
-2
Documentation/git-push.txt
+8
-1
@@ -148,12 +148,19 @@ useful if you write an alias or script around 'git push'.
148
-q::
149
--quiet::
150
Suppress all output, including the listing of updated refs,
151
- unless an error occurs.
151
+ unless an error occurs. Progress is not reported to the standard
152
+ error stream.
153
154
-v::
155
--verbose::
156
Run verbosely.
157
158
+--progress::
159
+ Progress status is reported on the standard error stream
160
+ by default when it is attached to a terminal, unless -q
161
+ is specified. This flag forces progress status even if the
162
+ standard error stream is not directed to a terminal.
163
+
164
include::urls-remotes.txt[]
165
166
OUTPUT
builtin-push.c
+3
-1
@@ -18,6 +18,7 @@ static int thin;
18
static int deleterefs;
19
static const char *receivepack;
20
static int verbosity;
21
+static int progress;
22
23
static const char **refspec;
24
static int refspec_nr;
@@ -107,7 +108,7 @@ static int push_with_options(struct transport *transport, int flags)
108
int err;
109
int nonfastforward;
110
110
- transport_set_verbosity(transport, verbosity, 0);
111
+ transport_set_verbosity(transport, verbosity, progress);
112
113
if (receivepack)
114
transport_set_option(transport,
@@ -223,6 +224,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
224
OPT_STRING( 0 , "exec", &receivepack, "receive-pack", "receive pack program"),
225
OPT_BIT('u', "set-upstream", &flags, "set upstream for git pull/status",
226
TRANSPORT_PUSH_SET_UPSTREAM),
227
+ OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"),
228
OPT_END()
229
};
230