@matheusbsbs / matheus-bagliano / commits / 714fddf2fc
Fork 0

Change double quotes to single quotes in message

Most of the time when we give branch name in the message, we quote it inside a pair of single-quotes. git-checkout uses double-quotes; this patch corrects the inconsistency. Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jari Aalto committed Mar 21, 2009 at 11:00 UTC 714fddf2fc50cd5abb11d75837e6340edb9601f6
2 files changed +4 -4
builtin-checkout.c
+3 -3
@@ -501,10 +501,10 @@ static void update_refs_for_switch(struct checkout_opts *opts,
501 create_symref("HEAD", new->path, msg.buf);
502 if (!opts->quiet) {
503 if (old->path && !strcmp(new->path, old->path))
504 - fprintf(stderr, "Already on \"%s\"\n",
504 + fprintf(stderr, "Already on '%s'\n",
505 new->name);
506 else
507 - fprintf(stderr, "Switched to%s branch \"%s\"\n",
507 + fprintf(stderr, "Switched to%s branch '%s'\n",
508 opts->new_branch ? " a new" : "",
509 new->name);
510 }
@@ -513,7 +513,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,
513 REF_NODEREF, DIE_ON_ERR);
514 if (!opts->quiet) {
515 if (old->path)
516 - fprintf(stderr, "Note: moving to \"%s\" which isn't a local branch\nIf you want to create a new branch from this checkout, you may do so\n(now or later) by using -b with the checkout command again. Example:\n git checkout -b <new_branch_name>\n", new->name);
516 + fprintf(stderr, "Note: moving to '%s' which isn't a local branch\nIf you want to create a new branch from this checkout, you may do so\n(now or later) by using -b with the checkout command again. Example:\n git checkout -b <new_branch_name>\n", new->name);
517 describe_detached_head("HEAD is now at", new->commit);
518 }
519 }
t/t7201-co.sh
+1 -1
@@ -171,7 +171,7 @@ test_expect_success 'checkout to detach HEAD' '
171 git checkout -f renamer && git clean -f &&
172 git checkout renamer^ 2>messages &&
173 (cat >messages.expect <<EOF
174 -Note: moving to "renamer^" which isn'"'"'t a local branch
174 +Note: moving to '\''renamer^'\'' which isn'\''t a local branch
175 If you want to create a new branch from this checkout, you may do so
176 (now or later) by using -b with the checkout command again. Example:
177 git checkout -b <new_branch_name>