{"thread":{"id":"40512","subject":"[PATCH v2 1/2] quote: fix broken sq_quote_buf() related comment","startedAt":"2015-10-07T22:05:49Z","lastAt":"2015-10-07T22:46:57Z","messageCount":3,"participants":["Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"271282","messageId":"1444255550-27631-1-git-send-email-chriscool@tuxfamily.org","threadId":"40512","inReplyTo":null,"subject":"[PATCH v2 1/2] quote: fix broken sq_quote_buf() related comment","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2015-10-07T22:05:49Z","receivedAt":"2015-10-07T22:05:49Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Since 77d604c (Enhanced sq_quote(), 10 Oct 2005), the\ncomment at the beginning of quote.c is broken.\nLet's fix it.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\nThe only change in this v2 is the added Signed-off-by ;-)\nSorry for the spam.\n\n quote.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/quote.c b/quote.c\nindex 7920e18..890885a 100644\n--- a/quote.c\n+++ b/quote.c\n@@ -7,6 +7,7 @@ int quote_path_fully = 1;\n /* Help to copy the thing properly quoted for the shell safety.\n  * any single quote is replaced with '\\'', any exclamation point\n  * is replaced with '\\!', and the whole thing is enclosed in a\n+ * single quote pair.\n  *\n  * E.g.\n  *  original     sq_quote     result\n-- \n2.6.0\n"},{"id":"271283","messageId":"1444255550-27631-2-git-send-email-chriscool@tuxfamily.org","threadId":"40512","inReplyTo":"1444255550-27631-1-git-send-email-chriscool@tuxfamily.org","subject":"[PATCH v2 2/2] quote: move comment before sq_quote_buf()","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2015-10-07T22:05:50Z","receivedAt":"2015-10-07T22:05:50Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"A big comment at the beginning of quote.c is really\nrelated to sq_quote_buf(), so let's move it in front\nof this function.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n quote.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/quote.c b/quote.c\nindex 890885a..fe884d2 100644\n--- a/quote.c\n+++ b/quote.c\n@@ -4,6 +4,11 @@\n \n int quote_path_fully = 1;\n \n+static inline int need_bs_quote(char c)\n+{\n+\treturn (c == '\\'' || c == '!');\n+}\n+\n /* Help to copy the thing properly quoted for the shell safety.\n  * any single quote is replaced with '\\'', any exclamation point\n  * is replaced with '\\!', and the whole thing is enclosed in a\n@@ -16,11 +21,6 @@ int quote_path_fully = 1;\n  *  a'b      ==> a'\\''b    ==> 'a'\\''b'\n  *  a!b      ==> a'\\!'b    ==> 'a'\\!'b'\n  */\n-static inline int need_bs_quote(char c)\n-{\n-\treturn (c == '\\'' || c == '!');\n-}\n-\n void sq_quote_buf(struct strbuf *dst, const char *src)\n {\n \tchar *to_free = NULL;\n-- \n2.6.0\n"},{"id":"271285","messageId":"xmqqoagas3dq.fsf@gitster.mtv.corp.google.com","threadId":"40512","inReplyTo":"1444255550-27631-2-git-send-email-chriscool@tuxfamily.org","subject":"Re: [PATCH v2 2/2] quote: move comment before sq_quote_buf()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-10-07T22:46:57Z","receivedAt":"2015-10-07T22:46:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, will queue.\n"}]}