summaryrefslogtreecommitdiff
path: root/include/git2/errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r--include/git2/errors.h59
1 files changed, 42 insertions, 17 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h
index 856343857..fb6670004 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -17,30 +17,55 @@
*/
GIT_BEGIN_DECL
-typedef enum {
+#ifdef GIT_OLD_ERRORS
+enum {
GIT_SUCCESS = 0,
- GIT_ERROR = -1,
-
- /** Input does not exist in the scope searched. */
+ GIT_ENOTOID = -2,
GIT_ENOTFOUND = -3,
-
- /** A reference with this name already exists */
+ GIT_ENOMEM = -4,
+ GIT_EOSERR = -5,
+ GIT_EOBJTYPE = -6,
+ GIT_ENOTAREPO = -7,
+ GIT_EINVALIDTYPE = -8,
+ GIT_EMISSINGOBJDATA = -9,
+ GIT_EPACKCORRUPTED = -10,
+ GIT_EFLOCKFAIL = -11,
+ GIT_EZLIB = -12,
+ GIT_EBUSY = -13,
+ GIT_EBAREINDEX = -14,
+ GIT_EINVALIDREFNAME = -15,
+ GIT_EREFCORRUPTED = -16,
+ GIT_ETOONESTEDSYMREF = -17,
+ GIT_EPACKEDREFSCORRUPTED = -18,
+ GIT_EINVALIDPATH = -19,
+ GIT_EREVWALKOVER = -20,
+ GIT_EINVALIDREFSTATE = -21,
+ GIT_ENOTIMPLEMENTED = -22,
GIT_EEXISTS = -23,
-
- /** The given integer literal is too large to be parsed */
GIT_EOVERFLOW = -24,
-
- /** The given short oid is ambiguous */
+ GIT_ENOTNUM = -25,
+ GIT_ESTREAM = -26,
+ GIT_EINVALIDARGS = -27,
+ GIT_EOBJCORRUPTED = -28,
GIT_EAMBIGUOUS = -29,
-
- /** Skip and passthrough the given ODB backend */
GIT_EPASSTHROUGH = -30,
-
- /** The buffer is too short to satisfy the request */
+ GIT_ENOMATCH = -31,
GIT_ESHORTBUFFER = -32,
+};
+#endif
- GIT_EREVWALKOVER = -33,
-} git_error_t;
+/** Generic return codes */
+enum {
+ GIT_OK = 0,
+ GIT_ERROR = -1,
+ GIT_ENOTFOUND = -3,
+ GIT_EEXISTS = -4,
+ GIT_EAMBIGUOUS = -5,
+ GIT_EBUFS = -6,
+
+ GIT_PASSTHROUGH = -30,
+ GIT_REVWALKOVER = -31,
+};
typedef struct {
char *message;
@@ -63,7 +88,7 @@ typedef enum {
GITERR_TAG,
GITERR_TREE,
GITERR_INDEXER,
-} git_error_class;
+} git_error_t;
/**
* Return the last `git_error` object that was generated for the