Skip to content

Commit 44cd91e

Browse files
chriscoolgitster
authored andcommitted
quote: move comment before sq_quote_buf()
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca9da0d commit 44cd91e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

quote.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
int quote_path_fully = 1;
66

7+
static inline int need_bs_quote(char c)
8+
{
9+
return (c == '\'' || c == '!');
10+
}
11+
712
/* Help to copy the thing properly quoted for the shell safety.
813
* any single quote is replaced with '\'', any exclamation point
914
* is replaced with '\!', and the whole thing is enclosed in a
@@ -16,11 +21,6 @@ int quote_path_fully = 1;
1621
* a'b ==> a'\''b ==> 'a'\''b'
1722
* a!b ==> a'\!'b ==> 'a'\!'b'
1823
*/
19-
static inline int need_bs_quote(char c)
20-
{
21-
return (c == '\'' || c == '!');
22-
}
23-
2424
void sq_quote_buf(struct strbuf *dst, const char *src)
2525
{
2626
char *to_free = NULL;

0 commit comments

Comments
 (0)