summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-09-06 15:15:46 +0200
committernulltoken <emeric.fermas@gmail.com>2012-09-17 10:48:30 +0200
commitc214fa1caff937f20ca3a388652352cda92ce85b (patch)
tree95e4b878cb2d0aeb13e18a830b192f0b366c9246 /include/git2/checkout.h
parent020cda99c2bec386cb10200f6cfe1b150911ffc9 (diff)
downloadlibgit2-c214fa1caff937f20ca3a388652352cda92ce85b.tar.gz
checkout: segregate checkout strategies
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r--include/git2/checkout.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 3217ac9a0..5707de0d7 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -21,13 +21,16 @@
*/
GIT_BEGIN_DECL
-
-#define GIT_CHECKOUT_OVERWRITE_EXISTING 0 /* default */
-#define GIT_CHECKOUT_SKIP_EXISTING 1
+enum {
+ GIT_CHECKOUT_DEFAULT = (1 << 0),
+ GIT_CHECKOUT_OVERWRITE_MODIFIED = (1 << 1),
+ GIT_CHECKOUT_CREATE_MISSING = (1 << 2),
+ GIT_CHECKOUT_REMOVE_UNTRACKED = (1 << 3),
+};
/* Use zeros to indicate default settings */
typedef struct git_checkout_opts {
- int existing_file_action; /* default: GIT_CHECKOUT_OVERWRITE_EXISTING */
+ unsigned int checkout_strategy; /* default: GIT_CHECKOUT_DEFAULT */
int disable_filters;
int dir_mode; /* default is 0755 */
int file_mode; /* default is 0644 */