Signed-off-by: Jacob Nisnevich <jacob.nisnevich@xxxxxxxxx> --- mergetools/examdiff | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 mergetools/examdiff diff --git a/mergetools/examdiff b/mergetools/examdiff new file mode 100644 index 0000000..474fffe --- /dev/null +++ b/mergetools/examdiff @@ -0,0 +1,37 @@ +diff_cmd () { + "$merge_tool_path" "$LOCAL" "$REMOTE" -nh +} + +merge_cmd () { + touch "$BACKUP" + if $base_present + then + "$merge_tool_path" -merge "$LOCAL" "$BASE" "$REMOTE" -o:"$MERGED" -nh + else + "$merge_tool_path" -merge "$LOCAL" "$REMOTE" -o:"$MERGED" -nh + fi + check_unchanged +} + +translate_merge_tool_path() { + # Use ExamDiff.com if it exists in $PATH + if type -p ExamDiff.com >/dev/null 2>&1 + then + printf ExamDiff.com + return + fi + + # Look for ExamDiff.com in the typical locations + examdiff="ExamDiff Pro/ExamDiff.com" + for directory in $(env | grep -Ei '^PROGRAM(FILES(\(X86\))?|W6432)=' | + cut -d '=' -f 2- | sort -u) + do + if test -n "$directory" && test -x "$directory/$examdiff" + then + printf '%s' "$directory/$examdiff" + return + fi + done + + printf ExamDiff.com +} \ No newline at end of file -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html