summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c088543)
raw | patch | inline | side by side (parent: c088543)
author | Rene Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Fri, 25 Jul 2008 10:41:23 +0000 (12:41 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 26 Jul 2008 00:20:55 +0000 (17:20 -0700) |
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>
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>
archive.h | patch | blob | history | |
builtin-upload-archive.c | patch | blob | history |
diff --git a/archive.h b/archive.h
index f6ceaebc8fb8694349ee9e755dd50e366c33d5ce..929368d80b2d73fa926da532fe526be85f5a4c47 100644 (file)
--- a/archive.h
+++ b/archive.h
#ifndef ARCHIVE_H
#define ARCHIVE_H
-#define MAX_EXTRA_ARGS 32
-#define MAX_ARGS (MAX_EXTRA_ARGS + 32)
-
struct archiver_args {
const char *base;
size_t baselen;
index cc37b36d996cfc293987a30e23725d28bd635f57..a9b02fa32f372a6810867c10560a20d58b5b2a91 100644 (file)
--- a/builtin-upload-archive.c
+++ b/builtin-upload-archive.c
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)
{
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;