git_reset_*: pass parameters as const pointers
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
diff --git a/include/git2/reset.h b/include/git2/reset.h
index bd29c69..be25414 100644
--- a/include/git2/reset.h
+++ b/include/git2/reset.h
@@ -61,7 +61,7 @@ typedef enum {
*/
GIT_EXTERN(int) git_reset(
git_repository *repo,
- git_object *target,
+ const git_object *target,
git_reset_t reset_type,
const git_checkout_options *checkout_opts);
@@ -79,7 +79,7 @@ GIT_EXTERN(int) git_reset(
*/
GIT_EXTERN(int) git_reset_from_annotated(
git_repository *repo,
- git_annotated_commit *commit,
+ const git_annotated_commit *commit,
git_reset_t reset_type,
const git_checkout_options *checkout_opts);
@@ -103,8 +103,8 @@ GIT_EXTERN(int) git_reset_from_annotated(
*/
GIT_EXTERN(int) git_reset_default(
git_repository *repo,
- git_object *target,
- git_strarray* pathspecs);
+ const git_object *target,
+ const git_strarray* pathspecs);
/** @} */
GIT_END_DECL
diff --git a/src/reset.c b/src/reset.c
index 066b5db..eb4cc39 100644
--- a/src/reset.c
+++ b/src/reset.c
@@ -20,8 +20,8 @@
int git_reset_default(
git_repository *repo,
- git_object *target,
- git_strarray* pathspecs)
+ const git_object *target,
+ const git_strarray* pathspecs)
{
git_object *commit = NULL;
git_tree *tree = NULL;
@@ -100,7 +100,7 @@ cleanup:
static int reset(
git_repository *repo,
- git_object *target,
+ const git_object *target,
const char *to,
git_reset_t reset_type,
const git_checkout_options *checkout_opts)
@@ -182,7 +182,7 @@ cleanup:
int git_reset(
git_repository *repo,
- git_object *target,
+ const git_object *target,
git_reset_t reset_type,
const git_checkout_options *checkout_opts)
{
@@ -191,7 +191,7 @@ int git_reset(
int git_reset_from_annotated(
git_repository *repo,
- git_annotated_commit *commit,
+ const git_annotated_commit *commit,
git_reset_t reset_type,
const git_checkout_options *checkout_opts)
{