Commit 74c37c2a by Jacques Germishuys

Added options to enable patience and minimal diff drivers

parent 13de9363
......@@ -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.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment