mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-04 04:49:18 +00:00
Added options to enable patience and minimal diff drivers
This commit is contained in:
parent
13de936316
commit
74c37c2a48
@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@ -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.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user