From 2951add0e908f04fd63b48b8fcc138ae4dd66116 Mon Sep 17 00:00:00 2001 From: Nick Townsend Date: Mon, 25 Nov 2013 15:31:09 -0800 Subject: [PATCH] ref-iteration doc: add_submodule_odb() returns 0 for success MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Heiko Voigt Signed-off-by: Nick Townsend Signed-off-by: Junio C Hamano --- Documentation/technical/api-ref-iteration.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/technical/api-ref-iteration.txt b/Documentation/technical/api-ref-iteration.txt index aa1c50f181..02adfd45d3 100644 --- a/Documentation/technical/api-ref-iteration.txt +++ b/Documentation/technical/api-ref-iteration.txt @@ -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.