提交 2951add0 编写于 作者: N Nick Townsend 提交者: Junio C Hamano

ref-iteration doc: add_submodule_odb() returns 0 for success

The usage sample of add_submodule_odb() function in the Submodules
section expects non-zero return value for success, but the function
actually reports success with zero.
Helped-by: NRené Scharfe <l.s.r@web.de>
Reviewed-by: NHeiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: NNick Townsend <nick.townsend@mac.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 be38bee8
......@@ -50,10 +50,10 @@ submodules object database. You can do this by a code-snippet like
this:
const char *path = "path/to/submodule"
if (!add_submodule_odb(path))
if (add_submodule_odb(path))
die("Error submodule '%s' not populated.", path);
`add_submodule_odb()` will return an non-zero value on success. If you
`add_submodule_odb()` will return zero on success. If you
do not do this you will get an error for each ref that it does not point
to a valid object.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册