diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-16 14:32:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-16 14:32:58 -0700 |
commit | 119ffa3351d2be06cb21e3a95e235a747fe7b783 (patch) | |
tree | acf12ab568971c5080f00970d0203e7867964aa8 | |
parent | Merge branch 'es/worktree-add-cleanup' into maint (diff) | |
parent | quote: move comment before sq_quote_buf() (diff) | |
download | tgif-119ffa3351d2be06cb21e3a95e235a747fe7b783.tar.xz |
Merge branch 'cc/quote-comments' into maint
A no-op code-health maintenance.
* cc/quote-comments:
quote: move comment before sq_quote_buf()
quote: fix broken sq_quote_buf() related comment
-rw-r--r-- | quote.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -4,9 +4,15 @@ 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 + * single quote pair. * * E.g. * original sq_quote result @@ -15,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; |