summaryrefslogtreecommitdiff
path: root/builtin-upload-archive.c
diff options
context:
space:
mode:
authorLibravatar Rene Scharfe <rene.scharfe@lsrfire.ath.cx>2008-07-25 12:41:23 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-07-25 17:20:55 -0700
commit7f4d0511af9d6c93656dda5a683632f5ae5b5278 (patch)
tree4283fd96080a451db5982d9b10d94965aa988ddd /builtin-upload-archive.c
parentarchive: move parameter parsing code to archive.c (diff)
downloadtgif-7f4d0511af9d6c93656dda5a683632f5ae5b5278.tar.xz
archive: define MAX_ARGS where it's needed
MAX_EXTRA_ARGS is not used anymore, so remove it. MAX_ARGS is used only in builtin-upload-archive.c, so define it there. Also report the actual value we're comparing against when the number of args is too big. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-upload-archive.c')
-rw-r--r--builtin-upload-archive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-upload-archive.c b/builtin-upload-archive.c
index cc37b36d99..a9b02fa32f 100644
--- a/builtin-upload-archive.c
+++ b/builtin-upload-archive.c
@@ -16,6 +16,7 @@ static const char deadchild[] =
static const char lostchild[] =
"git upload-archive: archiver process was lost";
+#define MAX_ARGS (64)
static int run_upload_archive(int argc, const char **argv, const char *prefix)
{
@@ -45,7 +46,7 @@ static int run_upload_archive(int argc, const char **argv, const char *prefix)
if (len == 0)
break; /* got a flush */
if (sent_argc > MAX_ARGS - 2)
- die("Too many options (>29)");
+ die("Too many options (>%d)", MAX_ARGS - 2);
if (p[len-1] == '\n') {
p[--len] = 0;