summaryrefslogtreecommitdiffstats
path: root/quote.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-01-15 17:59:43 +0700
committerJunio C Hamano <gitster@pobox.com>2018-01-16 12:16:54 -0800
commite35f11c29391e557964a39204fae6b89afab6a2a (patch)
treecfa0895a5da003a8b0f0e366699b7614d0d7835a /quote.c
parent6366dd9000a3f67e47a30d94375a88dabc18ec6f (diff)
downloadgit-e35f11c29391e557964a39204fae6b89afab6a2a.tar.gz
git-e35f11c29391e557964a39204fae6b89afab6a2a.tar.xz
sq_quote_argv: drop maxlen parameter
No caller passes anything but "0" for this parameter, which requests that the function ignore it completely. In fact, in all of history there was only one such caller, and it went away in 7f51f8bc2b (alias: use run_command api to execute aliases, 2011-01-07). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'quote.c')
-rw-r--r--quote.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/quote.c b/quote.c
index de2922ddd..b2970da62 100644
--- a/quote.c
+++ b/quote.c
@@ -56,7 +56,7 @@ void sq_quotef(struct strbuf *dst, const char *fmt, ...)
strbuf_release(&src);
}
-void sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen)
+void sq_quote_argv(struct strbuf *dst, const char **argv)
{
int i;
@@ -65,8 +65,6 @@ void sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen)
for (i = 0; argv[i]; ++i) {
strbuf_addch(dst, ' ');
sq_quote_buf(dst, argv[i]);
- if (maxlen && dst->len > maxlen)
- die("Too many or long arguments");
}
}