From: Christian Couder <christian.couder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git <git@vger.kernel.org>, Christian Couder <chriscool@tuxfamily.org>
Subject: [PATCH v2 2/2] quote: move comment before sq_quote_buf()
Date: Thu, 8 Oct 2015 00:05:50 +0200 [thread overview]
Message-ID: <1444255550-27631-2-git-send-email-chriscool@tuxfamily.org> (raw)
In-Reply-To: <1444255550-27631-1-git-send-email-chriscool@tuxfamily.org>
A big comment at the beginning of quote.c is really
related to sq_quote_buf(), so let's move it in front
of this function.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
quote.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/quote.c b/quote.c
index 890885a..fe884d2 100644
--- a/quote.c
+++ b/quote.c
@@ -4,6 +4,11 @@
int quote_path_fully = 1;
+static inline int need_bs_quote(char c)
+{
+ return (c == '\'' || c == '!');
+}
+
/* Help to copy the thing properly quoted for the shell safety.
* any single quote is replaced with '\'', any exclamation point
* is replaced with '\!', and the whole thing is enclosed in a
@@ -16,11 +21,6 @@ int quote_path_fully = 1;
* a'b ==> a'\''b ==> 'a'\''b'
* a!b ==> a'\!'b ==> 'a'\!'b'
*/
-static inline int need_bs_quote(char c)
-{
- return (c == '\'' || c == '!');
-}
-
void sq_quote_buf(struct strbuf *dst, const char *src)
{
char *to_free = NULL;
--
2.6.0
next prev parent reply other threads:[~2015-10-07 22:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 22:05 [PATCH v2 1/2] quote: fix broken sq_quote_buf() related comment Christian Couder
2015-10-07 22:05 ` Christian Couder [this message]
2015-10-07 22:46 ` [PATCH v2 2/2] quote: move comment before sq_quote_buf() Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444255550-27631-2-git-send-email-chriscool@tuxfamily.org \
--to=christian.couder@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).