Skip to content

Commit

Permalink
ref-iteration doc: add_submodule_odb() returns 0 for success
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nick Townsend authored and Junio C Hamano committed Dec 3, 2013
1 parent be38bee commit 2951add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/technical/api-ref-iteration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 2951add

Please sign in to comment.