quote_path: give flags parameter to quote_path()

The quote_path() function computes a path (relative to its base
directory) and c-quotes the result if necessary.  Teach it to take a
flags parameter to allow its behaviour to be enriched later.

No behaviour change intended.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2020-09-10 10:01:54 -07:00
parent c34d24b8a4
commit 88910c9939
5 changed files with 26 additions and 26 deletions

View File

@@ -72,7 +72,7 @@ void write_name_quoted_relative(const char *name, const char *prefix,
FILE *fp, int terminator);
/* quote path as relative to the given prefix */
char *quote_path(const char *in, const char *prefix, struct strbuf *out);
char *quote_path(const char *in, const char *prefix, struct strbuf *out, unsigned flags);
/* quoting as a string literal for other languages */
void perl_quote_buf(struct strbuf *sb, const char *src);