Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
649834fd
Commit
649834fd
authored
Mar 17, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reset: `git_checkout_options` is `const`
parent
eaf0d688
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
include/git2/reset.h
+2
-2
src/reset.c
+3
-3
No files found.
include/git2/reset.h
View file @
649834fd
...
...
@@ -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.
...
...
src/reset.c
View file @
649834fd
...
...
@@ -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
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment