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
46625836
Commit
46625836
authored
Feb 07, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge driver: correct indentation
parent
58d33126
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
src/merge.c
+13
-13
src/merge_driver.c
+17
-17
No files found.
src/merge.c
View file @
46625836
...
...
@@ -261,7 +261,7 @@ int git_merge_base(git_oid *out, git_repository *repo, const git_oid *one, const
int
git_merge_bases
(
git_oidarray
*
out
,
git_repository
*
repo
,
const
git_oid
*
one
,
const
git_oid
*
two
)
{
int
error
;
git_revwalk
*
walk
;
git_revwalk
*
walk
;
git_commit_list
*
result
,
*
list
;
git_array_oid_t
array
;
...
...
@@ -925,8 +925,8 @@ static int merge_conflict_resolve_contents(
goto
done
;
}
error
=
merge_conflict_invoke_driver
(
&
merge_result
,
driver
,
data
,
diff_list
,
&
source
);
error
=
merge_conflict_invoke_driver
(
&
merge_result
,
driver
,
data
,
diff_list
,
&
source
);
if
(
error
==
GIT_PASSTHROUGH
)
{
data
=
NULL
;
...
...
@@ -934,12 +934,12 @@ static int merge_conflict_resolve_contents(
&
git_merge_driver__text
,
data
,
diff_list
,
&
source
);
}
if
(
error
<
0
)
{
if
(
error
==
GIT_EMERGECONFLICT
)
error
=
0
;
if
(
error
<
0
)
{
if
(
error
==
GIT_EMERGECONFLICT
)
error
=
0
;
goto
done
;
}
goto
done
;
}
git_vector_insert
(
&
diff_list
->
staged
,
merge_result
);
git_vector_insert
(
&
diff_list
->
resolved
,
(
git_merge_diff
*
)
conflict
);
...
...
@@ -2199,14 +2199,14 @@ static int merge_annotated_commits(
git_iterator
*
base_iter
=
NULL
,
*
our_iter
=
NULL
,
*
their_iter
=
NULL
;
int
error
;
if
((
error
=
compute_base
(
&
base
,
repo
,
ours
,
theirs
,
opts
,
if
((
error
=
compute_base
(
&
base
,
repo
,
ours
,
theirs
,
opts
,
recursion_level
))
<
0
)
{
if
(
error
!=
GIT_ENOTFOUND
)
goto
done
;
if
(
error
!=
GIT_ENOTFOUND
)
goto
done
;
giterr_clear
();
}
giterr_clear
();
}
if
((
error
=
iterator_for_annotated_commit
(
&
base_iter
,
base
))
<
0
||
(
error
=
iterator_for_annotated_commit
(
&
our_iter
,
ours
))
<
0
||
...
...
src/merge_driver.c
View file @
46625836
...
...
@@ -143,20 +143,20 @@ static void merge_driver_registry_shutdown(void)
{
struct
merge_driver_registry
*
reg
;
git_merge_driver_entry
*
entry
;
size_t
i
;
size_t
i
;
if
((
reg
=
git__swap
(
merge_driver_registry
,
NULL
))
==
NULL
)
return
;
if
((
reg
=
git__swap
(
merge_driver_registry
,
NULL
))
==
NULL
)
return
;
git_vector_foreach
(
&
reg
->
drivers
,
i
,
entry
)
{
if
(
entry
&&
entry
->
driver
->
shutdown
)
entry
->
driver
->
shutdown
(
entry
->
driver
);
git_vector_foreach
(
&
reg
->
drivers
,
i
,
entry
)
{
if
(
entry
&&
entry
->
driver
->
shutdown
)
entry
->
driver
->
shutdown
(
entry
->
driver
);
git__free
(
entry
);
}
git__free
(
entry
);
}
git_vector_free
(
&
reg
->
drivers
);
git__free
(
reg
);
git_vector_free
(
&
reg
->
drivers
);
git__free
(
reg
);
}
git_merge_driver
git_merge_driver__normal
=
{
...
...
@@ -202,15 +202,15 @@ static int merge_driver_registry_initialize(void)
reg
=
git__calloc
(
1
,
sizeof
(
struct
merge_driver_registry
));
GITERR_CHECK_ALLOC
(
reg
);
if
((
error
=
git_vector_init
(
&
reg
->
drivers
,
3
,
merge_driver_entry_cmp
))
<
0
)
if
((
error
=
git_vector_init
(
&
reg
->
drivers
,
3
,
merge_driver_entry_cmp
))
<
0
)
goto
done
;
reg
=
git__compare_and_swap
(
&
merge_driver_registry
,
NULL
,
reg
);
reg
=
git__compare_and_swap
(
&
merge_driver_registry
,
NULL
,
reg
);
if
(
reg
!=
NULL
)
goto
done
;
if
(
reg
!=
NULL
)
goto
done
;
git__on_shutdown
(
merge_driver_registry_shutdown
);
git__on_shutdown
(
merge_driver_registry_shutdown
);
if
((
error
=
git_merge_driver_register
(
merge_driver_name__text
,
&
git_merge_driver__text
))
<
0
||
...
...
@@ -294,7 +294,7 @@ git_merge_driver *git_merge_driver_lookup(const char *name)
if
(
error
==
GIT_ENOTFOUND
)
return
NULL
;
entry
=
git_vector_get
(
&
merge_driver_registry
->
drivers
,
pos
);
entry
=
git_vector_get
(
&
merge_driver_registry
->
drivers
,
pos
);
if
(
!
entry
->
initialized
)
{
if
(
entry
->
driver
->
initialize
&&
...
...
@@ -304,7 +304,7 @@ git_merge_driver *git_merge_driver_lookup(const char *name)
entry
->
initialized
=
1
;
}
return
entry
->
driver
;
return
entry
->
driver
;
}
static
int
merge_driver_name_for_path
(
...
...
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