summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2012-11-17 19:54:47 -0800
committerBen Straub <bs@github.com>2012-11-27 13:18:27 -0800
commitcfbe4be3fb639d96587974794fe437ace0c383c4 (patch)
tree1dcc1a4462075a7832d4cb853634af00fb78e7b1 /include/git2/checkout.h
parent2508cc66eb91597b12dc19721d9cea1f06e72107 (diff)
downloadlibgit2-cfbe4be3fb639d96587974794fe437ace0c383c4.tar.gz
More external API cleanup
Conflicts: src/branch.c tests-clar/refs/branches/create.c
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r--include/git2/checkout.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 27ecc7102..bd988db2c 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -146,8 +146,12 @@ typedef enum {
* Checkout options structure
*
* Use zeros to indicate default settings.
+ * This needs to be initialized with the `GIT_CHECKOUT_OPTS_INIT` macro:
+ *
+ * git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
*/
typedef struct git_checkout_opts {
+ unsigned int version;
unsigned int checkout_strategy; /** default will be a dry run */
int disable_filters; /** don't apply filters like CRLF conversion */
@@ -182,6 +186,8 @@ typedef struct git_checkout_opts {
git_strarray paths;
} git_checkout_opts;
+#define GIT_CHECKOUT_OPTS_INIT {1, 0}
+
/**
* Updates files in the index and the working tree to match the content of the
* commit pointed at by HEAD.
@@ -223,7 +229,7 @@ GIT_EXTERN(int) git_checkout_index(
*/
GIT_EXTERN(int) git_checkout_tree(
git_repository *repo,
- git_object *treeish,
+ const git_object *treeish,
git_checkout_opts *opts);
/** @} */