summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1a3c36)
raw | patch | inline | side by side (parent: c1a3c36)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 10 Dec 2010 07:42:05 +0000 (23:42 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 10 Dec 2010 07:42:05 +0000 (23:42 -0800) |
... while fixing a miscounting.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c | patch | blob | history |
diff --git a/submodule.c b/submodule.c
index 4e62900af1c28a37ee44514afe93f398eed591e0..6f1c10722f744f4a27f18dae4867b15ecbf57d49 100644 (file)
--- a/submodule.c
+++ b/submodule.c
if (read_cache() < 0)
die("index file corrupt");
- argv = xcalloc(num_options + 5, sizeof(const char *));
+ /* 4: "fetch" (options) "--submodule-prefix" prefix NULL */
+ argv = xcalloc(num_options + 4, sizeof(const char *));
argv[argc++] = "fetch";
for (i = 0; i < num_options; i++)
argv[argc++] = options[i];