summaryrefslogtreecommitdiff
path: root/include/git2
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
parent2a827f80474d74ba7d145afeb0fc0795282fabc4 (diff)
downloadlibgit2-ethomson/checkout_safety.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')
-rw-r--r--include/git2/checkout.h9
-rw-r--r--include/git2/deprecated.h15
2 files changed, 17 insertions, 7 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 1d145336b..02950eb3c 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -190,13 +190,8 @@ typedef enum {
/** Recursively checkout submodules if HEAD moved in super repo (NOT IMPLEMENTED) */
GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED = (1u << 17),
- /**
- * 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`.
- */
- GIT_CHECKOUT_NONE = (1u << 30)
+ /** Reserved for backward compatibility */
+ GIT_CHECKOUT_RESERVED = (1u << 30)
} git_checkout_strategy_t;
/**
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
*/
/**@{*/