reset: `git_checkout_options` is `const`
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
diff --git a/include/git2/reset.h b/include/git2/reset.h
index c03dbed..37e578e 100644
--- a/include/git2/reset.h
+++ b/include/git2/reset.h
@@ -62,7 +62,7 @@ GIT_EXTERN(int) git_reset(
git_repository *repo,
git_object *target,
git_reset_t reset_type,
- git_checkout_options *checkout_opts);
+ const git_checkout_options *checkout_opts);
/**
* Sets the current head to the specified commit oid and optionally
@@ -80,7 +80,7 @@ GIT_EXTERN(int) git_reset_from_annotated(
git_repository *repo,
git_annotated_commit *commit,
git_reset_t reset_type,
- git_checkout_options *checkout_opts);
+ const git_checkout_options *checkout_opts);
/**
* Updates some entries in the index from the target commit tree.
diff --git a/src/reset.c b/src/reset.c
index aaebf41..d08e48c 100644
--- a/src/reset.c
+++ b/src/reset.c
@@ -102,7 +102,7 @@ static int reset(
git_object *target,
const char *to,
git_reset_t reset_type,
- git_checkout_options *checkout_opts)
+ const git_checkout_options *checkout_opts)
{
git_object *commit = NULL;
git_index *index = NULL;
@@ -183,7 +183,7 @@ int git_reset(
git_repository *repo,
git_object *target,
git_reset_t reset_type,
- git_checkout_options *checkout_opts)
+ const git_checkout_options *checkout_opts)
{
return reset(repo, target, git_oid_tostr_s(git_object_id(target)), reset_type, checkout_opts);
}
@@ -192,7 +192,7 @@ int git_reset_from_annotated(
git_repository *repo,
git_annotated_commit *commit,
git_reset_t reset_type,
- git_checkout_options *checkout_opts)
+ const git_checkout_options *checkout_opts)
{
return reset(repo, (git_object *) commit->commit, commit->ref_name, reset_type, checkout_opts);
}