Skip to contentSkip to conversation

Fix 'Cloning into' message

PATCH New Richard Hartmann 2 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix 'Cloning into' message

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(-)
builtin/clone.c +2 -2
index 488f48e..efe8b6c 100644
@@ -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);
Signature · 1 line
1.7.7
#1 lore raw

PATCH 1/1 Fix 'Cloning into' message

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(-)
builtin/clone.c +2 -2
index 488f48e..efe8b6c 100644
@@ -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);
Signature · 1 line
1.7.7
#2 lore raw
Quoted 9 lines · Richard Hartmann

Without this patch,

git clone foo .

results in this:

Cloning into ....
done.

Quoted 6 lines

With it:

    Cloning into '.'...
    done.

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.

#3 lore raw
Quoted 3 lines · Junio C Hamano

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.

Quoted 1 line
   $ git clone foo "joey's foo"

In that case, the user has other problems ;)

Richard