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
61f33f3e
Commit
61f33f3e
authored
Apr 05, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge_driver: use GIT_ASSERT
parent
c59fbafd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
src/merge_driver.c
+17
-11
No files found.
src/merge_driver.c
View file @
61f33f3e
...
...
@@ -32,33 +32,38 @@ static struct merge_driver_registry merge_driver_registry;
static
void
git_merge_driver_global_shutdown
(
void
);
git_repository
*
git_merge_driver_source_repo
(
const
git_merge_driver_source
*
src
)
git_repository
*
git_merge_driver_source_repo
(
const
git_merge_driver_source
*
src
)
{
assert
(
src
);
GIT_ASSERT_ARG_WITH_RETVAL
(
src
,
NULL
);
return
src
->
repo
;
}
const
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
);
GIT_ASSERT_ARG_WITH_RETVAL
(
src
,
NULL
);
return
src
->
ancestor
;
}
const
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
);
GIT_ASSERT_ARG_WITH_RETVAL
(
src
,
NULL
);
return
src
->
ours
;
}
const
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
);
GIT_ASSERT_ARG_WITH_RETVAL
(
src
,
NULL
);
return
src
->
theirs
;
}
const
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
);
GIT_ASSERT_ARG_WITH_RETVAL
(
src
,
NULL
);
return
src
->
file_opts
;
}
...
...
@@ -262,7 +267,8 @@ int git_merge_driver_register(const char *name, git_merge_driver *driver)
{
int
error
;
assert
(
name
&&
driver
);
GIT_ASSERT_ARG
(
name
);
GIT_ASSERT_ARG
(
driver
);
if
(
git_rwlock_wrlock
(
&
merge_driver_registry
.
lock
)
<
0
)
{
git_error_set
(
GIT_ERROR_OS
,
"failed to lock merge driver registry"
);
...
...
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