summaryrefslogtreecommitdiff
path: root/include/git2/deprecated.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-03-01 22:36:50 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-03-23 08:35:59 -0400
commit09a51af5e234c5961e64f6fd16935a4daa31aa5c (patch)
tree86096feede60ee946198c9e1cd1109dabe727519 /include/git2/deprecated.h
parent2a827f80474d74ba7d145afeb0fc0795282fabc4 (diff)
downloadlibgit2-09a51af5e234c5961e64f6fd16935a4daa31aa5c.tar.gz
checkout: deprecate GIT_CHECKOUT_NONEethomson/checkout_safety
`GIT_CHECKOUT_NONE` makes little sense. Users should prefer `DRY_RUN`, and `NONE` should be deprecated.
Diffstat (limited to 'include/git2/deprecated.h')
-rw-r--r--include/git2/deprecated.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index f73d7da61..66b0cff81 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -260,6 +260,21 @@ GIT_EXTERN(void) git_buf_free(git_buf *buffer);
/**@}*/
+/** @name Deprecated Checkout Definitions */
+/**@{*/
+
+/**
+ * Do not do a checkout and do not fire callbacks; this is useful
+ * for internal functions that will perform the checkout themselves
+ * but need to pass checkout options into another function, for
+ * example, `git_clone`.
+ *
+ * @deprecated Users should use `GIT_CHECKOUT_DRY_RUN`
+ */
+#define GIT_CHECKOUT_NONE (1u << 30)
+
+/**@}*/
+
/** @name Deprecated Commit Definitions
*/
/**@{*/