X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-clone.c;h=58bacbd552c1e2496034346265a3e5ab219e2672;hb=0901d5a2ef80996cf64c8afeaec765e1bc09f795;hp=caf3025031d83dc860b22c7798dd5f40b6b89ed2;hpb=e2d2e383d87dcbcd296ca9f21f3c8b7ef853c928;p=git.git diff --git a/builtin-clone.c b/builtin-clone.c index caf302503..58bacbd55 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -44,10 +44,13 @@ static char *option_origin = NULL; 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"), @@ -362,9 +365,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix) const char *repo_name, *repo, *work_tree, *git_dir; char *path, *dir; int dest_exists; - const struct ref *refs, *remote_head, *mapped_refs; + const struct ref *refs, *remote_head; const struct ref *remote_head_points_at; const struct ref *our_head_points_at; + struct ref *mapped_refs; struct strbuf key = STRBUF_INIT, value = STRBUF_INIT; struct strbuf branch_top = STRBUF_INIT, reflog_msg = STRBUF_INIT; struct transport *transport = NULL; @@ -525,6 +529,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_quiet) transport->verbose = -1; else if (option_verbose) + transport->verbose = 1; + + if (option_progress) transport->progress = 1; if (option_upload_pack)