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: René Scharfe <l.s.r@web.de> Reviewed-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Nick Townsend <nick.townsend@mac.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nick Townsend committed Nov 25, 2013 at 15:31 UTC 2951add0e908f04fd63b48b8fcc138ae4dd66116
1 file changed +2 -2
Documentation/technical/api-ref-iteration.txt
+2 -2
@@ -50,10 +50,10 @@ submodules object database. You can do this by a code-snippet like
50 this:
51
52 const char *path = "path/to/submodule"
53 - if (!add_submodule_odb(path))
53 + if (add_submodule_odb(path))
54 die("Error submodule '%s' not populated.", path);
55
56 -`add_submodule_odb()` will return an non-zero value on success. If you
56 +`add_submodule_odb()` will return zero on success. If you
57 do not do this you will get an error for each ref that it does not point
58 to a valid object.
59