summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Cunz <sascha@babbelbox.org>2013-11-02 03:20:05 +0000
committerSascha Cunz <sascha@babbelbox.org>2013-11-02 03:20:05 +0000
commit10749f6ca25179778cf60e411f7de3de1444271d (patch)
treebc57b1eaa25c8057b29f0ac907e1fbbcc86e3ab3
parent7f13edfdbbff733ecbde4020de00e3bfa8e5a868 (diff)
downloadlibgit2-10749f6ca25179778cf60e411f7de3de1444271d.tar.gz
Checkout: Unifiy const-ness of `opts` parameter
Since all 3 checkout APIs perform the same operation with the options, all of them should use the same const-ness.
-rw-r--r--include/git2/checkout.h4
-rw-r--r--src/checkout.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 3793a4f18..4c6a4ebf7 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -272,7 +272,7 @@ GIT_EXTERN(int) git_checkout_head(
GIT_EXTERN(int) git_checkout_index(
git_repository *repo,
git_index *index,
- git_checkout_opts *opts);
+ const git_checkout_opts *opts);
/**
* Updates files in the index and working tree to match the content of the
@@ -288,7 +288,7 @@ GIT_EXTERN(int) git_checkout_index(
GIT_EXTERN(int) git_checkout_tree(
git_repository *repo,
const git_object *treeish,
- git_checkout_opts *opts);
+ const git_checkout_opts *opts);
/** @} */
GIT_END_DECL
diff --git a/src/checkout.c b/src/checkout.c
index 76edc6a72..20b964b54 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -2018,7 +2018,7 @@ cleanup:
int git_checkout_index(
git_repository *repo,
git_index *index,
- git_checkout_opts *opts)
+ const git_checkout_opts *opts)
{
int error;
git_iterator *index_i;
@@ -2053,7 +2053,7 @@ int git_checkout_index(
int git_checkout_tree(
git_repository *repo,
const git_object *treeish,
- git_checkout_opts *opts)
+ const git_checkout_opts *opts)
{
int error;
git_tree *tree = NULL;