clone: quell the progress report from init and report on clone
Currently, a local git clone reports only initializing an empty git dir, which is potentially confusing. Instead, report that cloning is in progress and when it is done (unless -q) is given, and suppress the init report. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Apr 23, 2010 at 14:37 UTC
28ba96ab27d0471af101b4796534ad4085019db1
2 files changed
+6
-2
builtin/clone.c
+5
-1
@@ -302,6 +302,8 @@ static const struct ref *clone_local(const char *src_repo,
302
transport = transport_get(remote, src_repo);
303
ret = transport_get_remote_refs(transport);
304
transport_disconnect(transport);
305
+ if (0 <= option_verbosity)
306
+ printf("done.\n");
307
return ret;
308
}
309
@@ -461,7 +463,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
463
die("could not create leading directories of '%s'", git_dir);
464
set_git_dir(make_absolute_path(git_dir));
465
464
- init_db(option_template, (option_verbosity < 0) ? INIT_DB_QUIET : 0);
466
+ if (0 <= option_verbosity)
467
+ printf("Cloning into %s...\n", get_git_dir());
468
+ init_db(option_template, INIT_DB_QUIET);
469
470
/*
471
* At this point, the config exists, so we do not need the
t/t5601-clone.sh
+1
-1
@@ -34,7 +34,7 @@ test_expect_success 'clone with excess parameters (2)' '
34
test_expect_success 'output from clone' '
35
rm -fr dst &&
36
git clone -n "file://$(pwd)/src" dst >output &&
37
- test $(grep Initialized output | wc -l) = 1
37
+ test $(grep Clon output | wc -l) = 1
38
'
39
40
test_expect_success 'clone does not keep pack' '