提交 1c1f3537 编写于 作者: J Junio C Hamano

fetch_populated_submodules(): document dynamic allocation

... while fixing a miscounting.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 c1a3c364
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册