Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fetch_populated_submodules(): document dynamic allocation
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>
submodule.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
c1a3c36
)
diff --git
a/submodule.c
b/submodule.c
index 4e62900af1c28a37ee44514afe93f398eed591e0..6f1c10722f744f4a27f18dae4867b15ecbf57d49 100644
(file)
--- a/
submodule.c
+++ b/
submodule.c
@@
-264,7
+264,8
@@
int fetch_populated_submodules(int num_options, const char **options,
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];