summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorNick Townsend <nick.townsend@mac.com>2013-11-25 23:31:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-03 18:40:40 (GMT)
commit2951add0e908f04fd63b48b8fcc138ae4dd66116 (patch)
treed805f3d71cf309ce009ab366e5b4361a9daf2dc4 /Documentation
parentbe38bee862d628e29043b3f680580ceb24a6ba1e (diff)
downloadgit-2951add0e908f04fd63b48b8fcc138ae4dd66116.zip
git-2951add0e908f04fd63b48b8fcc138ae4dd66116.tar.gz
git-2951add0e908f04fd63b48b8fcc138ae4dd66116.tar.bz2
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/technical/api-ref-iteration.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/technical/api-ref-iteration.txt b/Documentation/technical/api-ref-iteration.txt
index aa1c50f..02adfd4 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.