diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2008-10-09 01:40:32 +0200 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-10-09 11:26:17 -0700 |
commit | 21188b1eafd3741fda0f7905dc997279a17b50ba (patch) | |
tree | 68bbf5f02d00fd354efd097fff73ec09f4d9c4b6 /builtin-clone.c | |
parent | 23abd3f48cb217d1558fa1984bfa8c502717c08f (diff) | |
download | git-21188b1eafd3741fda0f7905dc997279a17b50ba.tar.gz |
Implement git clone -v
The new -v option forces the progressbar, even in case the output
is not a terminal. This can be useful if the caller is an IDE or
wrapper which wants to scrape the progressbar from stderr and show
its information in a different format.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin-clone.c')
-rw-r--r-- | builtin-clone.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin-clone.c b/builtin-clone.c index 49d2eb9c2b..df71b23810 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -38,9 +38,11 @@ static int option_local, option_no_hardlinks, option_shared; static char *option_template, *option_reference, *option_depth; static char *option_origin = NULL; static char *option_upload_pack = "git-upload-pack"; +static int option_verbose; static struct option builtin_clone_options[] = { OPT__QUIET(&option_quiet), + OPT__VERBOSE(&option_verbose), OPT_BOOLEAN('n', "no-checkout", &option_no_checkout, "don't create a checkout"), OPT_BOOLEAN(0, "bare", &option_bare, "create a bare repository"), @@ -506,6 +508,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_quiet) transport->verbose = -1; + else if (option_verbose) + transport->progress = 1; if (option_upload_pack) transport_set_option(transport, TRANS_OPT_UPLOADPACK, |