git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] clone: have progress report mention top level dir, not git dir
@ 2010-05-09  1:23 Pete Harlan
  2010-05-09 11:02 ` Jeff King
  0 siblings, 1 reply; 14+ messages in thread
From: Pete Harlan @ 2010-05-09  1:23 UTC (permalink / raw)
  To: git list

"git clone foo bar" currently reports "Cloning into
/path/to/bar/.git".  Change this message to "Cloning into bar" to more
closely match the user's expectation.

Signed-off-by: Pete Harlan <pgit@pcharlan.com>
---

This changes a progress message introduced a few weeks ago in
28ba96ab2.  Unless there's a particular reason to report the .git dir
instead of the top level dir, seeing the top level dir feels more
natural to me.

(Or printing nothing.  For a local clone, silently succeeding seems
like a reasonable default.  And for a nonlocal clone there's enough
noise that the user is comforted that something is happening.)

For a --bare clone the current message prints the top level dir
(because that is the git dir), so one could argue in favor of the
current message because it confirms for the user whether their
checkout was bare or not.  But that's only if the user is aware of how
it would appear in both cases; I doubt that the existing code intended
to make that distinction clear, and in practice I expect most users
(a) trust git to do what they asked and (b) wouldn't notice that
"Cloning into /path/to/bar" meant that it was a bare checkout.

 builtin/clone.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index 0bedde4..306aacf 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -464,7 +464,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 	set_git_dir(make_absolute_path(git_dir));
 
 	if (0 <= option_verbosity)
-		printf("Cloning into %s...\n", get_git_dir());
+		printf("Cloning into %s...\n", dir);
 	init_db(option_template, INIT_DB_QUIET);
 
 	/*
-- 
1.7.1.14.gcafbfa

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-05-12  7:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-09  1:23 [PATCH/RFC] clone: have progress report mention top level dir, not git dir Pete Harlan
2010-05-09 11:02 ` Jeff King
2010-05-09 20:09   ` [PATCH v2 0/2] clone: simplify progress message Pete Harlan
2010-05-09 20:10     ` [PATCH v2 1/2] clone: have progress report mention top level dir, not git dir Pete Harlan
2010-05-09 20:11     ` [PATCH v2 2/2] clone: add bare clone to the progress message Pete Harlan
2010-05-09 22:15     ` [PATCH v2 0/2] clone: simplify " Junio C Hamano
2010-05-09 23:10       ` Pete Harlan
2010-05-10  5:47     ` Jeff King
2010-05-10 10:31       ` Michael J Gruber
2010-05-10 14:46         ` [PATCH] clone: report check out for non-bare clones Michael J Gruber
2010-05-12  1:55           ` Junio C Hamano
2010-05-12  7:59             ` Michael J Gruber
2010-05-10 23:22         ` [PATCH v2 0/2] clone: simplify progress message Pete Harlan
2010-05-11  7:27           ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).