We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73e31f6 commit 4bd2a50Copy full SHA for 4bd2a50
include/git2/errors.h
@@ -109,7 +109,12 @@ typedef enum {
109
110
/**
111
* Return the last `git_error` object that was generated for the
112
- * current thread or NULL if no error has occurred.
+ * current thread.
113
+ *
114
+ * The default behaviour of this function is to return NULL if no previous error has occurred.
115
+ * However, libgit2's error strings are not cleared aggressively, so a prior
116
+ * (unrelated) error may be returned. This can avoided by only calling
117
+ * this function if the prior call to a libgit2 API returned an error.
118
*
119
* @return A git_error object.
120
*/
0 commit comments