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
74c37c2a
Commit
74c37c2a
authored
Mar 12, 2015
by
Jacques Germishuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added options to enable patience and minimal diff drivers
parent
13de9363
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
include/git2/merge.h
+6
-0
src/merge_file.c
+6
-0
No files found.
include/git2/merge.h
View file @
74c37c2a
...
...
@@ -134,6 +134,12 @@ typedef enum {
/** Ignore whitespace at end of line */
GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL
=
(
1
<<
5
),
/** Use the "patience diff" algorithm */
GIT_MERGE_FILE_DIFF_PATIENCE
=
(
1
<<
6
),
/** Take extra time to find minimal diff */
GIT_MERGE_FILE_DIFF_MINIMAL
=
(
1
<<
7
),
}
git_merge_file_flags_t
;
/**
...
...
src/merge_file.c
View file @
74c37c2a
...
...
@@ -158,6 +158,12 @@ static int git_merge_file__from_inputs(
if
(
options
.
flags
&
GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL
)
xmparam
.
xpp
.
flags
|=
XDF_IGNORE_WHITESPACE_AT_EOL
;
if
(
options
.
flags
&
GIT_MERGE_FILE_DIFF_PATIENCE
)
xmparam
.
xpp
.
flags
|=
XDF_PATIENCE_DIFF
;
if
(
options
.
flags
&
GIT_MERGE_FILE_DIFF_MINIMAL
)
xmparam
.
xpp
.
flags
|=
XDF_NEED_MINIMAL
;
if
((
xdl_result
=
xdl_merge
(
&
ancestor_mmfile
,
&
our_mmfile
,
&
their_mmfile
,
&
xmparam
,
&
mmbuffer
))
<
0
)
{
giterr_set
(
GITERR_MERGE
,
"Failed to merge files."
);
...
...
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