summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-10 22:13:07 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-22 22:26:51 +0000
commit647dfdb42d06514a85c1499f1be88a32b8a4c24b (patch)
tree634850813f54371cde39ca476c3cfb60e487da06
parent20961b9871f12814790ebed80d88692fbb962d4f (diff)
downloadlibgit2-647dfdb42d06514a85c1499f1be88a32b8a4c24b.tar.gz
git_error: deprecate error values
Replace the `GITERR` values with a `const int` to deprecate error values.
-rw-r--r--include/git2/errors.h68
-rw-r--r--src/errors.c2
2 files changed, 35 insertions, 35 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h
index 1b18473c0..f00385b8c 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -172,40 +172,40 @@ GIT_EXTERN(void) git_error_set_oom(void);
*/
/**@{*/
-#define GITERR_NONE GIT_ERROR_NONE
-#define GITERR_NOMEMORY GIT_ERROR_NOMEMORY
-#define GITERR_OS GIT_ERROR_OS
-#define GITERR_INVALID GIT_ERROR_INVALID
-#define GITERR_REFERENCE GIT_ERROR_REFERENCE
-#define GITERR_ZLIB GIT_ERROR_ZLIB
-#define GITERR_REPOSITORY GIT_ERROR_REPOSITORY
-#define GITERR_CONFIG GIT_ERROR_CONFIG
-#define GITERR_REGEX GIT_ERROR_REGEX
-#define GITERR_ODB GIT_ERROR_ODB
-#define GITERR_INDEX GIT_ERROR_INDEX
-#define GITERR_OBJECT GIT_ERROR_OBJECT
-#define GITERR_NET GIT_ERROR_NET
-#define GITERR_TAG GIT_ERROR_TAG
-#define GITERR_TREE GIT_ERROR_TREE
-#define GITERR_INDEXER GIT_ERROR_INDEXER
-#define GITERR_SSL GIT_ERROR_SSL
-#define GITERR_SUBMODULE GIT_ERROR_SUBMODULE
-#define GITERR_THREAD GIT_ERROR_THREAD
-#define GITERR_STASH GIT_ERROR_STASH
-#define GITERR_CHECKOUT GIT_ERROR_CHECKOUT
-#define GITERR_FETCHHEAD GIT_ERROR_FETCHHEAD
-#define GITERR_MERGE GIT_ERROR_MERGE
-#define GITERR_SSH GIT_ERROR_SSH
-#define GITERR_FILTER GIT_ERROR_FILTER
-#define GITERR_REVERT GIT_ERROR_REVERT
-#define GITERR_CALLBACK GIT_ERROR_CALLBACK
-#define GITERR_CHERRYPICK GIT_ERROR_CHERRYPICK
-#define GITERR_DESCRIBE GIT_ERROR_DESCRIBE
-#define GITERR_REBASE GIT_ERROR_REBASE
-#define GITERR_FILESYSTEM GIT_ERROR_FILESYSTEM
-#define GITERR_PATCH GIT_ERROR_PATCH
-#define GITERR_WORKTREE GIT_ERROR_WORKTREE
-#define GITERR_SHA1 GIT_ERROR_SHA1
+GIT_DEPRECATED(static const int) GITERR_NONE = GIT_ERROR_NONE;
+GIT_DEPRECATED(static const int) GITERR_NOMEMORY = GIT_ERROR_NOMEMORY;
+GIT_DEPRECATED(static const int) GITERR_OS = GIT_ERROR_OS;
+GIT_DEPRECATED(static const int) GITERR_INVALID = GIT_ERROR_INVALID;
+GIT_DEPRECATED(static const int) GITERR_REFERENCE = GIT_ERROR_REFERENCE;
+GIT_DEPRECATED(static const int) GITERR_ZLIB = GIT_ERROR_ZLIB;
+GIT_DEPRECATED(static const int) GITERR_REPOSITORY = GIT_ERROR_REPOSITORY;
+GIT_DEPRECATED(static const int) GITERR_CONFIG = GIT_ERROR_CONFIG;
+GIT_DEPRECATED(static const int) GITERR_REGEX = GIT_ERROR_REGEX;
+GIT_DEPRECATED(static const int) GITERR_ODB = GIT_ERROR_ODB;
+GIT_DEPRECATED(static const int) GITERR_INDEX = GIT_ERROR_INDEX;
+GIT_DEPRECATED(static const int) GITERR_OBJECT = GIT_ERROR_OBJECT;
+GIT_DEPRECATED(static const int) GITERR_NET = GIT_ERROR_NET;
+GIT_DEPRECATED(static const int) GITERR_TAG = GIT_ERROR_TAG;
+GIT_DEPRECATED(static const int) GITERR_TREE = GIT_ERROR_TREE;
+GIT_DEPRECATED(static const int) GITERR_INDEXER = GIT_ERROR_INDEXER;
+GIT_DEPRECATED(static const int) GITERR_SSL = GIT_ERROR_SSL;
+GIT_DEPRECATED(static const int) GITERR_SUBMODULE = GIT_ERROR_SUBMODULE;
+GIT_DEPRECATED(static const int) GITERR_THREAD = GIT_ERROR_THREAD;
+GIT_DEPRECATED(static const int) GITERR_STASH = GIT_ERROR_STASH;
+GIT_DEPRECATED(static const int) GITERR_CHECKOUT = GIT_ERROR_CHECKOUT;
+GIT_DEPRECATED(static const int) GITERR_FETCHHEAD = GIT_ERROR_FETCHHEAD;
+GIT_DEPRECATED(static const int) GITERR_MERGE = GIT_ERROR_MERGE;
+GIT_DEPRECATED(static const int) GITERR_SSH = GIT_ERROR_SSH;
+GIT_DEPRECATED(static const int) GITERR_FILTER = GIT_ERROR_FILTER;
+GIT_DEPRECATED(static const int) GITERR_REVERT = GIT_ERROR_REVERT;
+GIT_DEPRECATED(static const int) GITERR_CALLBACK = GIT_ERROR_CALLBACK;
+GIT_DEPRECATED(static const int) GITERR_CHERRYPICK = GIT_ERROR_CHERRYPICK;
+GIT_DEPRECATED(static const int) GITERR_DESCRIBE = GIT_ERROR_DESCRIBE;
+GIT_DEPRECATED(static const int) GITERR_REBASE = GIT_ERROR_REBASE;
+GIT_DEPRECATED(static const int) GITERR_FILESYSTEM = GIT_ERROR_FILESYSTEM;
+GIT_DEPRECATED(static const int) GITERR_PATCH = GIT_ERROR_PATCH;
+GIT_DEPRECATED(static const int) GITERR_WORKTREE = GIT_ERROR_WORKTREE;
+GIT_DEPRECATED(static const int) GITERR_SHA1 = GIT_ERROR_SHA1;
/**
* Return the last `git_error` object that was generated for the
diff --git a/src/errors.c b/src/errors.c
index aa9325579..1ee4fffb0 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -212,7 +212,7 @@ void giterr_system_set(int code)
#endif
}
-/* Deprecated functions */
+/* Deprecated error values and functions */
const git_error *giterr_last(void)
{