summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEtienne Samson <samson.etienne@gmail.com>2019-01-15 13:30:42 +0100
committerEtienne Samson <samson.etienne@gmail.com>2019-01-28 13:05:52 +0100
commit2964fed0c5dfeb3b1349ed354f57a3e10ac2a631 (patch)
treea92f5f2a86254bb2cf4362668243e31dceef2514 /docs
parent9e4d421edd42b785d52a8cefbda8b77f6a8e65f3 (diff)
downloadlibgit2-2964fed0c5dfeb3b1349ed354f57a3e10ac2a631.tar.gz
docs: document GIT_EUSER/GIT_EPASSTHROUGH
Diffstat (limited to 'docs')
-rw-r--r--docs/error-handling.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/error-handling.md b/docs/error-handling.md
index 8df9a4074..05725f2ed 100644
--- a/docs/error-handling.md
+++ b/docs/error-handling.md
@@ -110,6 +110,15 @@ int git_repository_open(git_repository **repository, const char *path)
}
~~~
+Note that some error codes have been defined with a specific meaning in the
+context of callbacks:
+- `GIT_EUSER` provides a way to bubble up a non libgit2-related failure, which
+ allows it to be preserved all the way up to the initial function call (a `git_cred`
+ setup trying to access an unavailable LDAP server for instance).
+- `GIT_EPASSTHROUGH` provides a way to tell libgit2 that it should behave as if
+ no callback was provided. This is of special interest to bindings, which would
+ always provide a C function as a "trampoline", and decide at runtime what to do.
+
The public error API
--------------------
@@ -119,7 +128,7 @@ The public error API
of error and the error message that was generated by the library.
Do not use this function unless the prior call to a libgit2 API
returned an error, as it can otherwise give misleading results.
- libgit2's error strings are not cleared aggressively,
+ libgit2's error strings are not cleared aggressively,
and this function may return an error string that reflects a prior error,
possibly even reflecting internal state.