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:
authorZheNing Hu <adlternative@gmail.com>2021-07-26 06:26:48 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-26 22:01:25 +0300
commit7121c4d4e2877115fb372b3f147fad4cd1306751 (patch)
tree99eba552be05773ac3b9e14a5358dafc72df2507 /quote.h
parentbd0708c7eb8be43242180a1ea2a0f0acda7a4fbc (diff)
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>
Diffstat (limited to 'quote.h')
-rw-r--r--quote.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/quote.h b/quote.h
index 768cc6338e..0fe69e264b 100644
--- a/quote.h
+++ b/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);