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
bb342159
Commit
bb342159
authored
Mar 15, 2017
by
Patrick Steinhardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge_driver: fix const-correctness for source getters
parent
8051b47f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
include/git2/sys/merge.h
+5
-5
src/merge_driver.c
+5
-5
No files found.
include/git2/sys/merge.h
View file @
bb342159
...
@@ -36,23 +36,23 @@ GIT_EXTERN(git_merge_driver *) git_merge_driver_lookup(const char *name);
...
@@ -36,23 +36,23 @@ GIT_EXTERN(git_merge_driver *) git_merge_driver_lookup(const char *name);
typedef
struct
git_merge_driver_source
git_merge_driver_source
;
typedef
struct
git_merge_driver_source
git_merge_driver_source
;
/** Get the repository that the source data is coming from. */
/** Get the repository that the source data is coming from. */
GIT_EXTERN
(
git_repository
*
)
git_merge_driver_source_repo
(
GIT_EXTERN
(
const
git_repository
*
)
git_merge_driver_source_repo
(
const
git_merge_driver_source
*
src
);
const
git_merge_driver_source
*
src
);
/** Gets the ancestor of the file to merge. */
/** Gets the ancestor of the file to merge. */
GIT_EXTERN
(
git_index_entry
*
)
git_merge_driver_source_ancestor
(
GIT_EXTERN
(
const
git_index_entry
*
)
git_merge_driver_source_ancestor
(
const
git_merge_driver_source
*
src
);
const
git_merge_driver_source
*
src
);
/** Gets the ours side of the file to merge. */
/** Gets the ours side of the file to merge. */
GIT_EXTERN
(
git_index_entry
*
)
git_merge_driver_source_ours
(
GIT_EXTERN
(
const
git_index_entry
*
)
git_merge_driver_source_ours
(
const
git_merge_driver_source
*
src
);
const
git_merge_driver_source
*
src
);
/** Gets the theirs side of the file to merge. */
/** Gets the theirs side of the file to merge. */
GIT_EXTERN
(
git_index_entry
*
)
git_merge_driver_source_theirs
(
GIT_EXTERN
(
const
git_index_entry
*
)
git_merge_driver_source_theirs
(
const
git_merge_driver_source
*
src
);
const
git_merge_driver_source
*
src
);
/** Gets the merge file options that the merge was invoked with */
/** Gets the merge file options that the merge was invoked with */
GIT_EXTERN
(
git_merge_file_options
*
)
git_merge_driver_source_file_options
(
GIT_EXTERN
(
const
git_merge_file_options
*
)
git_merge_driver_source_file_options
(
const
git_merge_driver_source
*
src
);
const
git_merge_driver_source
*
src
);
...
...
src/merge_driver.c
View file @
bb342159
...
@@ -32,31 +32,31 @@ static struct merge_driver_registry merge_driver_registry;
...
@@ -32,31 +32,31 @@ static struct merge_driver_registry merge_driver_registry;
static
void
git_merge_driver_global_shutdown
(
void
);
static
void
git_merge_driver_global_shutdown
(
void
);
git_repository
*
git_merge_driver_source_repo
(
const
git_merge_driver_source
*
src
)
const
git_repository
*
git_merge_driver_source_repo
(
const
git_merge_driver_source
*
src
)
{
{
assert
(
src
);
assert
(
src
);
return
src
->
repo
;
return
src
->
repo
;
}
}
git_index_entry
*
git_merge_driver_source_ancestor
(
const
git_merge_driver_source
*
src
)
const
git_index_entry
*
git_merge_driver_source_ancestor
(
const
git_merge_driver_source
*
src
)
{
{
assert
(
src
);
assert
(
src
);
return
src
->
ancestor
;
return
src
->
ancestor
;
}
}
git_index_entry
*
git_merge_driver_source_ours
(
const
git_merge_driver_source
*
src
)
const
git_index_entry
*
git_merge_driver_source_ours
(
const
git_merge_driver_source
*
src
)
{
{
assert
(
src
);
assert
(
src
);
return
src
->
ours
;
return
src
->
ours
;
}
}
git_index_entry
*
git_merge_driver_source_theirs
(
const
git_merge_driver_source
*
src
)
const
git_index_entry
*
git_merge_driver_source_theirs
(
const
git_merge_driver_source
*
src
)
{
{
assert
(
src
);
assert
(
src
);
return
src
->
theirs
;
return
src
->
theirs
;
}
}
git_merge_file_options
*
git_merge_driver_source_file_options
(
const
git_merge_driver_source
*
src
)
const
git_merge_file_options
*
git_merge_driver_source_file_options
(
const
git_merge_driver_source
*
src
)
{
{
assert
(
src
);
assert
(
src
);
return
src
->
file_opts
;
return
src
->
file_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