mirror of
https://github.com/git/git.git
synced 2024-11-02 07:17:58 +01:00
Merge branch 'cc/quote-comments'
A no-op code-health maintenance. * cc/quote-comments: quote: move comment before sq_quote_buf() quote: fix broken sq_quote_buf() related comment
This commit is contained in:
commit
1811f93522
1 changed files with 6 additions and 5 deletions
11
quote.c
11
quote.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue