summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-27 18:59:22 -0800
committerBen Straub <bs@github.com>2012-11-27 18:59:22 -0800
commit64c5112188647fcbfbe2bbfb897abfbc21912ba8 (patch)
tree5113408a049178d14664f72cc1666655783d95d5 /include/git2/checkout.h
parent469827812f95e979e3c6468567b2c9ed138a9849 (diff)
parentca94e031fa21787ae6336f0aada1b01b2dd22077 (diff)
downloadlibgit2-64c5112188647fcbfbe2bbfb897abfbc21912ba8.tar.gz
Merge pull request #1087 from libgit2/great-renaming
The Great Renaming of 2012
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);
/** @} */