git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
c1a3c36
)
fetch_populated_submodules(): document dynamic allocation
author
Junio C Hamano
<redacted>
Fri, 10 Dec 2010 07:42:05 +0000
(23:42 -0800)
committer
Junio C Hamano
<redacted>
Fri, 10 Dec 2010 07:42:05 +0000
(23:42 -0800)
... while fixing a miscounting.
Signed-off-by: Junio C Hamano <redacted>
submodule.c
patch
|
blob
|
history
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];
git clone https://git.99rst.org/PROJECT