Skip to content

Commit 714fddf

Browse files
jaaltogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 835a3ee commit 714fddf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

builtin-checkout.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,10 @@ static void update_refs_for_switch(struct checkout_opts *opts,
501501
create_symref("HEAD", new->path, msg.buf);
502502
if (!opts->quiet) {
503503
if (old->path && !strcmp(new->path, old->path))
504-
fprintf(stderr, "Already on \"%s\"\n",
504+
fprintf(stderr, "Already on '%s'\n",
505505
new->name);
506506
else
507-
fprintf(stderr, "Switched to%s branch \"%s\"\n",
507+
fprintf(stderr, "Switched to%s branch '%s'\n",
508508
opts->new_branch ? " a new" : "",
509509
new->name);
510510
}
@@ -513,7 +513,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,
513513
REF_NODEREF, DIE_ON_ERR);
514514
if (!opts->quiet) {
515515
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);
517517
describe_detached_head("HEAD is now at", new->commit);
518518
}
519519
}

t/t7201-co.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ test_expect_success 'checkout to detach HEAD' '
171171
git checkout -f renamer && git clean -f &&
172172
git checkout renamer^ 2>messages &&
173173
(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
175175
If you want to create a new branch from this checkout, you may do so
176176
(now or later) by using -b with the checkout command again. Example:
177177
git checkout -b <new_branch_name>

0 commit comments

Comments
 (0)