diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-15 00:58:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-15 00:58:42 -0700 |
commit | 53997a30f8138f41d1d9c7a45e84106cc21c0558 (patch) | |
tree | 656769918ccf2ffce554de623edb4a24e990d89e /builtin/fetch.c | |
parent | 66bce02ec459123d07c3f0230906cc2f8e36504c (diff) | |
parent | 212cfe157effe53537ec42f156fbf7415441efd0 (diff) | |
download | git-53997a30f8138f41d1d9c7a45e84106cc21c0558.tar.gz |
Merge branch 'tc/transport-verbosity'
* tc/transport-verbosity:
transport: update flags to be in running order
fetch and pull: learn --progress
push: learn --progress
transport->progress: use flag authoritatively
clone: support multiple levels of verbosity
push: support multiple levels of verbosity
fetch: refactor verbosity option handling into transport.[ch]
Documentation/git-push: put --quiet before --verbose
Documentation/git-pull: put verbosity options before merge/fetch ones
Documentation/git-clone: mention progress in -v
Conflicts:
transport.h
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r-- | builtin/fetch.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index b6c5b344be..2bb75c1305 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -28,6 +28,7 @@ enum { }; static int all, append, dry_run, force, keep, multiple, prune, update_head_ok, verbosity; +static int progress; static int tags = TAGS_DEFAULT; static const char *depth; static const char *upload_pack; @@ -57,6 +58,7 @@ static struct option builtin_fetch_options[] = { OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"), OPT_BOOLEAN('u', "update-head-ok", &update_head_ok, "allow updating of HEAD ref"), + OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"), OPT_STRING(0, "depth", &depth, "DEPTH", "deepen history of shallow clone"), OPT_END() @@ -845,10 +847,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv) die("Where do you want to fetch from today?"); transport = transport_get(remote, NULL); - if (verbosity >= 2) - transport->verbose = verbosity <= 3 ? verbosity : 3; - if (verbosity < 0) - transport->verbose = -1; + transport_set_verbosity(transport, verbosity, progress); if (upload_pack) set_option(TRANS_OPT_UPLOADPACK, upload_pack); if (keep) |