summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64b9032)
raw | patch | inline | side by side (parent: 64b9032)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Apr 2010 12:37:22 +0000 (14:37 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 4 May 2010 17:02:46 +0000 (10:02 -0700) |
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>
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>
builtin/clone.c | patch | blob | history | |
t/t5601-clone.sh | patch | blob | history |
diff --git a/builtin/clone.c b/builtin/clone.c
index 05f8fb4771b1ef07030338a6fd38dc7cb3bc1d1d..0bedde41f077f7c6e6106b144854c208ed4f6076 100644 (file)
--- a/builtin/clone.c
+++ b/builtin/clone.c
transport = transport_get(remote, src_repo);
ret = transport_get_remote_refs(transport);
transport_disconnect(transport);
+ if (0 <= option_verbosity)
+ printf("done.\n");
return ret;
}
die("could not create leading directories of '%s'", git_dir);
set_git_dir(make_absolute_path(git_dir));
- init_db(option_template, (option_verbosity < 0) ? INIT_DB_QUIET : 0);
+ if (0 <= option_verbosity)
+ printf("Cloning into %s...\n", get_git_dir());
+ init_db(option_template, INIT_DB_QUIET);
/*
* At this point, the config exists, so we do not need the
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 214756731baf199e6a50f9ab2380a8b4bfc0fb18..678cee502de54e5a9c18a43f114446d3392ec7f3 100755 (executable)
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
test_expect_success 'output from clone' '
rm -fr dst &&
git clone -n "file://$(pwd)/src" dst >output &&
- test $(grep Initialized output | wc -l) = 1
+ test $(grep Clon output | wc -l) = 1
'
test_expect_success 'clone does not keep pack' '