Commit 9f3a5a64b5f3c402e14094da2e4e71d49f03be9e

Edward Thomson 2019-01-23T00:29:03

deprecation: offer GIT_DEPRECATE_HARD Users can define `GIT_DEPRECATE_HARD` if they want to remove all functions that we've "softly" deprecated.

diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index 8f4ec8b..9d3a091 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -14,6 +14,11 @@
 #include "object.h"
 #include "refs.h"
 
+/*
+ * Users can avoid deprecated functions by defining `GIT_DEPRECATE_HARD`.
+ */
+#ifndef GIT_DEPRECATE_HARD
+
 /**
  * @file git2/deprecated.h
  * @brief libgit2 deprecated functions and values
@@ -244,3 +249,5 @@ GIT_EXTERN(void) giterr_set_oom(void);
 GIT_END_DECL
 
 #endif
+
+#endif