diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-08-30 12:22:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-30 12:22:26 +0200 |
| commit | db0c66483decd65b0eda5bc8a08e34c1682b98a9 (patch) | |
| tree | a8099dcc8638c175651a820236503e981263ff2a /include/git2/errors.h | |
| parent | df2f276e41f8b21f518f621043b99f2b34c109fb (diff) | |
| parent | c0b2e5256ca3580b8c0fd2e6b04ae1c27d692e2e (diff) | |
| download | libgit2-db0c66483decd65b0eda5bc8a08e34c1682b98a9.tar.gz | |
Merge pull request #4773 from RandomSort/giterr
Document giterr_last() use only after error. #4772
Diffstat (limited to 'include/git2/errors.h')
| -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..676434f4a 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 be avoided by only calling + * this function if the prior call to a libgit2 API returned an error. * * @return A git_error object. */ |
