mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
ref-filter: --format=%(raw) support --perl
Because the perl language can handle binary data correctly, add the function perl_quote_buf_with_len(), which can specify the length of the data and prevent the data from being truncated at '\0' to help `--format="%(raw)"` support `--perl`. Reviewed-by: Jacob Keller <jacob.keller@gmail.com> Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: ZheNing Hu <adlternative@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
bd0708c7eb
commit
7121c4d4e2
1
quote.h
1
quote.h
@@ -94,6 +94,7 @@ char *quote_path(const char *in, const char *prefix, struct strbuf *out, unsigne
|
||||
|
||||
/* quoting as a string literal for other languages */
|
||||
void perl_quote_buf(struct strbuf *sb, const char *src);
|
||||
void perl_quote_buf_with_len(struct strbuf *sb, const char *src, size_t len);
|
||||
void python_quote_buf(struct strbuf *sb, const char *src);
|
||||
void tcl_quote_buf(struct strbuf *sb, const char *src);
|
||||
void basic_regex_quote_buf(struct strbuf *sb, const char *src);
|
||||
|
||||
Reference in New Issue
Block a user