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
fc9d2897
Unverified
Commit
fc9d2897
authored
Jul 13, 2022
by
Jacob Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stash: add `const` to arguments
parent
d0155f10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
include/git2/stash.h
+3
-1
src/libgit2/stash.c
+4
-4
No files found.
include/git2/stash.h
View file @
fc9d2897
...
@@ -133,7 +133,9 @@ GIT_EXTERN(int) git_stash_save_options_init(
...
@@ -133,7 +133,9 @@ GIT_EXTERN(int) git_stash_save_options_init(
* or error code.
* or error code.
*/
*/
GIT_EXTERN
(
int
)
git_stash_save_with_opts
(
GIT_EXTERN
(
int
)
git_stash_save_with_opts
(
git_oid
*
out
,
git_repository
*
repo
,
git_stash_save_options
*
opts
);
git_oid
*
out
,
git_repository
*
repo
,
const
git_stash_save_options
*
opts
);
/** Stash application flags. */
/** Stash application flags. */
typedef
enum
{
typedef
enum
{
...
...
src/libgit2/stash.c
View file @
fc9d2897
...
@@ -196,7 +196,7 @@ static int stash_to_index(
...
@@ -196,7 +196,7 @@ static int stash_to_index(
static
int
stash_update_index_from_paths
(
static
int
stash_update_index_from_paths
(
git_repository
*
repo
,
git_repository
*
repo
,
git_index
*
index
,
git_index
*
index
,
git_strarray
*
paths
)
const
git_strarray
*
paths
)
{
{
unsigned
int
status_flags
;
unsigned
int
status_flags
;
size_t
i
,
error
=
0
;
size_t
i
,
error
=
0
;
...
@@ -420,7 +420,7 @@ static int build_stash_commit_from_tree(
...
@@ -420,7 +420,7 @@ static int build_stash_commit_from_tree(
git_commit
*
i_commit
,
git_commit
*
i_commit
,
git_commit
*
b_commit
,
git_commit
*
b_commit
,
git_commit
*
u_commit
,
git_commit
*
u_commit
,
git_tree
*
tree
)
const
git_tree
*
tree
)
{
{
const
git_commit
*
parents
[]
=
{
NULL
,
NULL
,
NULL
};
const
git_commit
*
parents
[]
=
{
NULL
,
NULL
,
NULL
};
...
@@ -613,7 +613,7 @@ static int has_changes_cb(const char *path, unsigned int status, void *payload)
...
@@ -613,7 +613,7 @@ static int has_changes_cb(const char *path, unsigned int status, void *payload)
static
int
ensure_there_are_changes_to_stash_paths
(
static
int
ensure_there_are_changes_to_stash_paths
(
git_repository
*
repo
,
git_repository
*
repo
,
uint32_t
flags
,
uint32_t
flags
,
git_strarray
*
paths
)
const
git_strarray
*
paths
)
{
{
int
error
;
int
error
;
git_status_options
opts
=
GIT_STATUS_OPTIONS_INIT
;
git_status_options
opts
=
GIT_STATUS_OPTIONS_INIT
;
...
@@ -674,7 +674,7 @@ int git_stash_save(
...
@@ -674,7 +674,7 @@ int git_stash_save(
}
}
int
git_stash_save_with_opts
(
int
git_stash_save_with_opts
(
git_oid
*
out
,
git_repository
*
repo
,
git_stash_save_options
*
opts
)
git_oid
*
out
,
git_repository
*
repo
,
const
git_stash_save_options
*
opts
)
{
{
git_index
*
index
=
NULL
,
*
paths_index
=
NULL
;
git_index
*
index
=
NULL
,
*
paths_index
=
NULL
;
git_commit
*
b_commit
=
NULL
,
*
i_commit
=
NULL
,
*
u_commit
=
NULL
;
git_commit
*
b_commit
=
NULL
,
*
i_commit
=
NULL
,
*
u_commit
=
NULL
;
...
...
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