diff options
author | Matthias Lederhofer <matled@gmx.net> | 2006-06-25 15:56:18 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-09 00:57:23 -0700 |
commit | 575ba9d69d5dfd07d95343fe946a5991c4cb27d6 (patch) | |
tree | 8f9f3ca832249b98c3621a09035baba2e1ce385f /quote.c | |
parent | 88f0d5d7d95f815d2e8a36a8ceb7459dbd90992c (diff) | |
download | git-575ba9d69d5dfd07d95343fe946a5991c4cb27d6.tar.gz |
GIT_TRACE: show which built-in/external commands are executed
With the environment variable GIT_TRACE set git will show
- alias expansion
- built-in command execution
- external command execution
on stderr.
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
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; |