summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65273bf)
raw | patch | inline | side by side (parent: 65273bf)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Fri, 25 Dec 2009 17:12:06 +0000 (01:12 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Dec 2009 02:49:19 +0000 (18:49 -0800) |
Follow the argument convention of git-pack-objects, such that a
separate option (--preogress) is used to force progress reporting
instead of -v/--verbose.
-v/--verbose now does not force progress reporting. Make git-clone.txt
say so.
This should cover all the bases in 21188b1 (Implement git clone -v),
which implemented the option to force progress reporting.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
separate option (--preogress) is used to force progress reporting
instead of -v/--verbose.
-v/--verbose now does not force progress reporting. Make git-clone.txt
say so.
This should cover all the bases in 21188b1 (Implement git clone -v),
which implemented the option to force progress reporting.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-clone.txt | patch | blob | history | |
builtin-clone.c | patch | blob | history | |
t/t5702-clone-options.sh | patch | blob | history |
index e722e6cfd23a71932c175ee178ede35f8815149a..f43c8b2c08ab4ca45f759369dc3d8e85c9f76415 100644 (file)
--verbose::
-v::
+ 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
diff --git a/builtin-clone.c b/builtin-clone.c
index 2d8bf5120ec60e05d7a9fb5fefc96e154d57881a..8ad2bd4699868308e28b3af46d5e70179f28c027 100644 (file)
--- a/builtin-clone.c
+++ b/builtin-clone.c
static char *option_branch = NULL;
static char *option_upload_pack = "git-upload-pack";
static int option_verbose;
+static int option_progress;
static struct option builtin_clone_options[] = {
OPT__QUIET(&option_quiet),
OPT__VERBOSE(&option_verbose),
+ OPT_BOOLEAN(0, "progress", &option_progress,
+ "force progress reporting"),
OPT_BOOLEAN('n', "no-checkout", &option_no_checkout,
"don't create a checkout"),
OPT_BOOLEAN(0, "bare", &option_bare, "create a bare repository"),
if (option_quiet)
transport->verbose = -1;
- else if (option_verbose) {
+ else if (option_verbose)
transport->verbose = 1;
+
+ if (option_progress)
transport->progress = 1;
- }
if (option_upload_pack)
transport_set_option(transport, TRANS_OPT_UPLOADPACK,
index 27825f5f31ca2310e08fd2555589aa878728b292..02cb02472322e8fd6c31548d30950c937e301e5f 100755 (executable)
--- a/t/t5702-clone-options.sh
+++ b/t/t5702-clone-options.sh
'
test_expect_success 'redirected clone -v' '
- git clone -v "file://$(pwd)/parent" clone-redirected-v >out 2>err &&
+ git clone --progress "file://$(pwd)/parent" clone-redirected-progress \
+ >out 2>err &&
test -s err
'