summaryrefslogtreecommitdiff
path: root/tests-clar/clar_libgit2.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar/clar_libgit2.h')
-rw-r--r--tests-clar/clar_libgit2.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests-clar/clar_libgit2.h b/tests-clar/clar_libgit2.h
index 4d338efca..63bc703d7 100644
--- a/tests-clar/clar_libgit2.h
+++ b/tests-clar/clar_libgit2.h
@@ -13,9 +13,9 @@
* return error codes!
*/
#define cl_git_pass(expr) do { \
- git_clearerror(); \
- if ((expr) != GIT_SUCCESS) \
- clar__assert(0, __FILE__, __LINE__, "Function call failed: " #expr, git_lasterror(), 1); \
+ giterr_clear(); \
+ if ((expr) != 0) \
+ clar__assert(0, __FILE__, __LINE__, "Function call failed: " #expr, giterr_last()->message, 1); \
} while(0)
/**