Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 2951add

Browse files
townsengitster
authored andcommitted
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 <[email protected]> Reviewed-by: Heiko Voigt <[email protected]> Signed-off-by: Nick Townsend <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent be38bee commit 2951add

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/technical/api-ref-iteration.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ submodules object database. You can do this by a code-snippet like
5050
this:
5151

5252
const char *path = "path/to/submodule"
53-
if (!add_submodule_odb(path))
53+
if (add_submodule_odb(path))
5454
die("Error submodule '%s' not populated.", path);
5555

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
5757
do not do this you will get an error for each ref that it does not point
5858
to a valid object.
5959

0 commit comments

Comments
 (0)