Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2010-06-03 17:36:31 +0400
committerJunio C Hamano <gitster@pobox.com>2010-06-05 20:14:13 +0400
commitb167cffb6b38a092e8f9e0e396c1931ee1dc8b7d (patch)
tree458a8e5d26d3377816f23b5e704c8afb322753ee /quote.h
parentc8b296450e5148c576697ea4709072b7855aacd5 (diff)
quote.c: separate quoting and relative path generation
This is in preparation of relative path support for ls-files, which quotes a path only if the line terminator is not the NUL character. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'quote.h')
-rw-r--r--quote.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/quote.h b/quote.h
index f83eb233c4..38003bff5f 100644
--- a/quote.h
+++ b/quote.h
@@ -54,9 +54,12 @@ extern void quote_two_c_style(struct strbuf *, const char *, const char *, int);
extern void write_name_quoted(const char *name, FILE *, int terminator);
extern void write_name_quotedpfx(const char *pfx, size_t pfxlen,
const char *name, FILE *, int terminator);
+extern void write_name_quoted_relative(const char *name, size_t len,
+ const char *prefix, size_t prefix_len,
+ FILE *fp, int terminator);
/* quote path as relative to the given prefix */
-char *quote_path_relative(const char *in, int len,
+extern char *quote_path_relative(const char *in, int len,
struct strbuf *out, const char *prefix);
/* quoting as a string literal for other languages */