diff options
author | Junio C Hamano <junkio@cox.net> | 2006-07-12 23:09:10 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-12 23:09:10 -0700 |
commit | d3ba675aae3c6c5722ad15cd9d0f3b7634e976ce (patch) | |
tree | 94813d10e42424a31cd58ad8eb9f338874cd0d7d /quote.c | |
parent | git-repack: avoid redirecting stderr into git-pack-objects (diff) | |
parent | test-lib: unset GIT_TRACE (diff) | |
download | tgif-d3ba675aae3c6c5722ad15cd9d0f3b7634e976ce.tar.xz |
Merge branch 'ml/trace'
* ml/trace:
test-lib: unset GIT_TRACE
GIT_TRACE: fix a mixed declarations and code warning
GIT_TRACE: show which built-in/external commands are executed
Diffstat (limited to 'quote.c')
-rw-r--r-- | quote.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -45,6 +45,23 @@ size_t sq_quote_buf(char *dst, size_t n, const char *src) return len; } +void sq_quote_print(FILE *stream, const char *src) +{ + char c; + + fputc('\'', stream); + while ((c = *src++)) { + if (need_bs_quote(c)) { + fputs("'\\", stream); + fputc(c, stream); + fputc('\'', stream); + } else { + fputc(c, stream); + } + } + fputc('\'', stream); +} + char *sq_quote(const char *src) { char *buf; |