{"thread":{"id":"18445","subject":"[PATCH] Change double quotes to single quotes in message","startedAt":"2009-03-21T09:08:12Z","lastAt":"2009-03-21T21:07:20Z","messageCount":2,"participants":["Jari Aalto","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"108787","messageId":"877i2j6y6b.fsf@jondo.cante.net","threadId":"18445","inReplyTo":null,"subject":"[PATCH] Change double quotes to single quotes in message","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2009-03-21T09:08:12Z","receivedAt":"2009-03-21T09:08:12Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"\n>From 6daec692a39a1ecf0452f1ad1eb7ba6fbf5661c9 Mon Sep 17 00:00:00 2001\nFrom: Jari Aalto <jari.aalto@cante.net>\nDate: Sat, 21 Mar 2009 11:00:54 +0200\nSubject: [PATCH] Change double quotes to single quotes in message\n\nThis helps selecting the text inside quotes by using mouse double-click\naction (e.g. in Putty). Functions affected: update_refs_for_switch(),\nupdate_refs_for_switch() and cmd_checkout().\n---\n builtin-checkout.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin-checkout.c b/builtin-checkout.c\nindex 9fdfc58..49daade 100644\n--- a/builtin-checkout.c\n+++ b/builtin-checkout.c\n@@ -503,10 +503,10 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n \t\tcreate_symref(\"HEAD\", new->path, msg.buf);\n \t\tif (!opts->quiet) {\n \t\t\tif (old->path && !strcmp(new->path, old->path))\n-\t\t\t\tfprintf(stderr, \"Already on \\\"%s\\\"\\n\",\n+\t\t\t\tfprintf(stderr, \"Already on '%s'\\n\",\n \t\t\t\t\tnew->name);\n \t\t\telse\n-\t\t\t\tfprintf(stderr, \"Switched to%s branch \\\"%s\\\"\\n\",\n+\t\t\t\tfprintf(stderr, \"Switched to%s branch '%s'\\n\",\n \t\t\t\t\topts->new_branch ? \" a new\" : \"\",\n \t\t\t\t\tnew->name);\n \t\t}\n@@ -515,7 +515,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n \t\t\t   REF_NODEREF, DIE_ON_ERR);\n \t\tif (!opts->quiet) {\n \t\t\tif (old->path)\n-\t\t\t\tfprintf(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);\n+\t\t\t\tfprintf(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);\n \t\t\tdescribe_detached_head(\"HEAD is now at\", new->commit);\n \t\t}\n \t}\n-- \n1.6.1.3\n"},{"id":"108813","messageId":"7v3ad6egaf.fsf@gitster.siamese.dyndns.org","threadId":"18445","inReplyTo":"877i2j6y6b.fsf@jondo.cante.net","subject":"Re: [PATCH] Change double quotes to single quotes in message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-21T21:07:20Z","receivedAt":"2009-03-21T21:07:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jari Aalto <jari.aalto@cante.net> writes:\n\n> From 6daec692a39a1ecf0452f1ad1eb7ba6fbf5661c9 Mon Sep 17 00:00:00 2001\n> From: Jari Aalto <jari.aalto@cante.net>\n> Date: Sat, 21 Mar 2009 11:00:54 +0200\n> Subject: [PATCH] Change double quotes to single quotes in message\n>\n> This helps selecting the text inside quotes by using mouse double-click\n> action (e.g. in Putty). Functions affected: update_refs_for_switch(),\n> update_refs_for_switch() and cmd_checkout().\n> ---\n\nThe patch is good.\n\nLacks sign-off, has extra header lines in body, and the justification can\nbe a lot stronger.  The three you identified are the only ones among 30\nhits from:\n\n    $ git grep -n -e \"printf(.*\\\".*['\\\"]%s\" -- '*.c'\n\nthat use dq around the path-like things, while all others use sq.  There\nalso are a few similar constructs using strbuf_addf all of which use sq.\nConsistency is good.\n\n>  builtin-checkout.c |    6 +++---\n>  1 files changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/builtin-checkout.c b/builtin-checkout.c\n> index 9fdfc58..49daade 100644\n> --- a/builtin-checkout.c\n> +++ b/builtin-checkout.c\n> @@ -503,10 +503,10 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n>  \t\tcreate_symref(\"HEAD\", new->path, msg.buf);\n>  \t\tif (!opts->quiet) {\n>  \t\t\tif (old->path && !strcmp(new->path, old->path))\n> -\t\t\t\tfprintf(stderr, \"Already on \\\"%s\\\"\\n\",\n> +\t\t\t\tfprintf(stderr, \"Already on '%s'\\n\",\n>  \t\t\t\t\tnew->name);\n>  \t\t\telse\n> -\t\t\t\tfprintf(stderr, \"Switched to%s branch \\\"%s\\\"\\n\",\n> +\t\t\t\tfprintf(stderr, \"Switched to%s branch '%s'\\n\",\n>  \t\t\t\t\topts->new_branch ? \" a new\" : \"\",\n>  \t\t\t\t\tnew->name);\n>  \t\t}\n> @@ -515,7 +515,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,\n>  \t\t\t   REF_NODEREF, DIE_ON_ERR);\n>  \t\tif (!opts->quiet) {\n>  \t\t\tif (old->path)\n> -\t\t\t\tfprintf(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);\n> +\t\t\t\tfprintf(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);\n>  \t\t\tdescribe_detached_head(\"HEAD is now at\", new->commit);\n>  \t\t}\n>  \t}\n> -- \n> 1.6.1.3\n"}]}