mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
c8b296450e
commit
b167cffb6b
5
quote.h
5
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 */
|
||||
|
||||
Reference in New Issue
Block a user