diff options
author | Vicent Marti <tanoku@gmail.com> | 2012-11-17 19:54:47 -0800 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2012-11-17 19:55:06 -0800 |
commit | 9b965c01e06e695e8ee51a1cc080cc1509cd4962 (patch) | |
tree | 6868aeb349ce620bee6bccaa0b6069b223fd6a13 /include/git2/checkout.h | |
parent | 0066955d9752cab8f8533c0dddfc95d08ad13e33 (diff) | |
download | libgit2-more-api-tweaks.tar.gz |
More external API cleanupmore-api-tweaks
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r-- | include/git2/checkout.h | 8 |
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); /** @} */ |