mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Fix rewrite_diff() name quoting.
This moves the logic to quote two paths (prefix + path) in C-style introduced in the previous commit from the dump_quoted_path() in combine-diff.c to quote.c, and uses it to fix rewrite_diff() that never C-quoted the pathnames correctly. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
1
quote.h
1
quote.h
@@ -41,6 +41,7 @@ extern char *sq_dequote(char *);
|
||||
|
||||
extern int unquote_c_style(struct strbuf *, const char *quoted, const char **endp);
|
||||
extern size_t quote_c_style(const char *name, struct strbuf *, FILE *, int no_dq);
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user