diff options
author | Johan Abildskov <randomsort@gmail.com> | 2018-08-20 13:51:28 +0200 |
---|---|---|
committer | Johan Abildskov <randomsort@gmail.com> | 2018-08-20 13:51:28 +0200 |
commit | 4bd2a508fbb100052b42a5aa35d829514d69a0fb (patch) | |
tree | 6e530ea53dc149f19fbf628f5fbcc7fbe4c8e266 | |
parent | 73e31f6f704df4a51c40ea56231741d24e863ab4 (diff) | |
download | libgit2-4bd2a508fbb100052b42a5aa35d829514d69a0fb.tar.gz |
Update giterr_last API documentation to reflect real behaviour
-rw-r--r-- | include/git2/errors.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h index 00fbed157..5ae58bd64 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -109,7 +109,12 @@ typedef enum { /** * Return the last `git_error` object that was generated for the - * current thread or NULL if no error has occurred. + * current thread. + * + * The default behaviour of this function is to return NULL if no previous error has occurred. + * However, libgit2's error strings are not cleared aggressively, so a prior + * (unrelated) error may be returned. This can avoided by only calling + * this function if the prior call to a libgit2 API returned an error. * * @return A git_error object. */ |