summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r--include/git2/checkout.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index ef3badbe9..fb1a23030 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -21,12 +21,27 @@
*/
GIT_BEGIN_DECL
-enum {
+/**
+ * Checkout behavior flags
+ *
+ * These flags control what checkout does with files. Pass in a
+ * combination of these values OR'ed together.
+ *
+ * - GIT_CHECKOUT_DEFAULT: With this value, checkout does not update
+ * any files in the working directory.
+ * - GIT_CHECKOUT_OVERWRITE_MODIFIED: When a file exists and is modified,
+ * replace the modifications with the new version.
+ * - GIT_CHECKOUT_CREATE_MISSING: When a file does not exist in the
+ * working directory, create it.
+ * - GIT_CHECKOUT_REMOVE_UNTRACKED: If an untracked file in encountered
+ * in the working directory, delete it.
+ */
+typedef enum {
GIT_CHECKOUT_DEFAULT = (1 << 0),
GIT_CHECKOUT_OVERWRITE_MODIFIED = (1 << 1),
GIT_CHECKOUT_CREATE_MISSING = (1 << 2),
GIT_CHECKOUT_REMOVE_UNTRACKED = (1 << 3),
-};
+} git_checkout_strategy_t;
/* Use zeros to indicate default settings */
typedef struct git_checkout_opts {