threads / patch / 28774

patchFix 'Cloning into' message

Subject: [PATCH] Fix 'Cloning into' message

## tl;dr

4 messages between Oct 26, 2011 and Oct 27, 2011. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Richard Hartmann· Oct 26, 2011, 17:05 UTC · lore
Without this patch,
    git clone foo .
results in this:
    Cloning into ....
    done.
With it:
    Cloning into '.'...
    done.
---
 builtin/clone.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to builtin/clone.c +2 −2
diff --git a/builtin/clone.c b/builtin/clone.c
index 488f48e..efe8b6c 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -577,9 +577,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 
 	if (0 <= option_verbosity) {
 		if (option_bare)
-			printf(_("Cloning into bare repository %s...\n"), dir);
+			printf(_("Cloning into bare repository '%s'...\n"), dir);
 		else
-			printf(_("Cloning into %s...\n"), dir);
+			printf(_("Cloning into '%s'...\n"), dir);
 	}
 	init_db(option_template, INIT_DB_QUIET);
 	write_config(&option_config);
-- 
1.7.7
Richard Hartmann· Oct 27, 2011, 16:46 UTC · re: Richard Hartmann · lore
Without this patch,
    git clone foo .
results in this:
    Cloning into ....
    done.
With it:
    Cloning into '.'...
    done.
Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com>
---
 builtin/clone.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to builtin/clone.c +2 −2
diff --git a/builtin/clone.c b/builtin/clone.c
index 488f48e..efe8b6c 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -577,9 +577,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 
 	if (0 <= option_verbosity) {
 		if (option_bare)
-			printf(_("Cloning into bare repository %s...\n"), dir);
+			printf(_("Cloning into bare repository '%s'...\n"), dir);
 		else
-			printf(_("Cloning into %s...\n"), dir);
+			printf(_("Cloning into '%s'...\n"), dir);
 	}
 	init_db(option_template, INIT_DB_QUIET);
 	write_config(&option_config);
-- 
1.7.7
Junio C Hamano· Oct 27, 2011, 17:39 UTC · re: Richard Hartmann · lore

Re: [PATCH] Fix 'Cloning into' message

Richard Hartmann <richih.mailinglist@gmail.com> writes:
Show 15 quoted lines
> Without this patch,
>
>     git clone foo .
>
> results in this:
>
>     Cloning into ....
>     done.
>
> With it:
>
>     Cloning into '.'...
>     done.
>
> Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com>

We try to be consistent and many places do quote user supplied paths in pair of single quotes in human readable messages, and this is in line with that pattern.

    $ git clone foo "joey's foo"
would result in
    Cloning into 'joey's foo'...
but that is probably Ok ;-)
Thanks.
Richard Hartmann· Oct 27, 2011, 18:34 UTC · re: Junio C Hamano · lore

Re: [PATCH] Fix 'Cloning into' message

On Thu, Oct 27, 2011 at 19:39, Junio C Hamano <gitster@pobox.com> wrote:
> We try to be consistent and many places do quote user supplied paths in
> pair of single quotes in human readable messages, and this is in line with
> that pattern.

Exactly. That is why I chose single quotes. Sorry for not including the signed-off the first time.

>    $ git clone foo "joey's foo"
In that case, the user has other problems ;)
Richard

← back to recent threads