Initial class construction
This commit is contained in:
18
Git/mingw64/libexec/git-core/mergetools/araxis
Normal file
18
Git/mingw64/libexec/git-core/mergetools/araxis
Normal file
@ -0,0 +1,18 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" -wait -2 "$LOCAL" "$REMOTE" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" -wait -merge -3 -a1 \
|
||||
"$BASE" "$LOCAL" "$REMOTE" "$MERGED" >/dev/null 2>&1
|
||||
else
|
||||
"$merge_tool_path" -wait -2 \
|
||||
"$LOCAL" "$REMOTE" "$MERGED" >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
echo compare
|
||||
}
|
23
Git/mingw64/libexec/git-core/mergetools/bc
Normal file
23
Git/mingw64/libexec/git-core/mergetools/bc
Normal file
@ -0,0 +1,23 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
|
||||
-mergeoutput="$MERGED"
|
||||
else
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" \
|
||||
-mergeoutput="$MERGED"
|
||||
fi
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
if type bcomp >/dev/null 2>/dev/null
|
||||
then
|
||||
echo bcomp
|
||||
else
|
||||
echo bcompare
|
||||
fi
|
||||
}
|
1
Git/mingw64/libexec/git-core/mergetools/bc3
Normal file
1
Git/mingw64/libexec/git-core/mergetools/bc3
Normal file
@ -0,0 +1 @@
|
||||
. "$MERGE_TOOLS_DIR/bc"
|
23
Git/mingw64/libexec/git-core/mergetools/codecompare
Normal file
23
Git/mingw64/libexec/git-core/mergetools/codecompare
Normal file
@ -0,0 +1,23 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" -MF="$LOCAL" -TF="$REMOTE" -BF="$BASE" \
|
||||
-RF="$MERGED"
|
||||
else
|
||||
"$merge_tool_path" -MF="$LOCAL" -TF="$REMOTE" \
|
||||
-RF="$MERGED"
|
||||
fi
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
if merge_mode
|
||||
then
|
||||
echo CodeMerge
|
||||
else
|
||||
echo CodeCompare
|
||||
fi
|
||||
}
|
25
Git/mingw64/libexec/git-core/mergetools/deltawalker
Normal file
25
Git/mingw64/libexec/git-core/mergetools/deltawalker
Normal file
@ -0,0 +1,25 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
# Adding $(pwd)/ in front of $MERGED should not be necessary.
|
||||
# However without it, DeltaWalker (at least v1.9.8 on Windows)
|
||||
# crashes with a JRE exception. The DeltaWalker user manual,
|
||||
# shows $(pwd)/ whenever the '-merged' options is given.
|
||||
# Adding it here seems to work around the problem.
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" -merged="$(pwd)/$MERGED"
|
||||
else
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" -merged="$(pwd)/$MERGED"
|
||||
fi >/dev/null 2>&1
|
||||
}
|
||||
|
||||
translate_merge_tool_path () {
|
||||
echo DeltaWalker
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
18
Git/mingw64/libexec/git-core/mergetools/diffmerge
Normal file
18
Git/mingw64/libexec/git-core/mergetools/diffmerge
Normal file
@ -0,0 +1,18 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" --merge --result="$MERGED" \
|
||||
"$LOCAL" "$BASE" "$REMOTE"
|
||||
else
|
||||
"$merge_tool_path" --merge \
|
||||
--result="$MERGED" "$LOCAL" "$REMOTE"
|
||||
fi
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
15
Git/mingw64/libexec/git-core/mergetools/diffuse
Normal file
15
Git/mingw64/libexec/git-core/mergetools/diffuse
Normal file
@ -0,0 +1,15 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" | cat
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" \
|
||||
"$LOCAL" "$MERGED" "$REMOTE" \
|
||||
"$BASE" | cat
|
||||
else
|
||||
"$merge_tool_path" \
|
||||
"$LOCAL" "$MERGED" "$REMOTE" | cat
|
||||
fi
|
||||
}
|
14
Git/mingw64/libexec/git-core/mergetools/ecmerge
Normal file
14
Git/mingw64/libexec/git-core/mergetools/ecmerge
Normal file
@ -0,0 +1,14 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" --default --mode=diff2 "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" \
|
||||
--default --mode=merge3 --to="$MERGED"
|
||||
else
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" \
|
||||
--default --mode=merge2 --to="$MERGED"
|
||||
fi
|
||||
}
|
26
Git/mingw64/libexec/git-core/mergetools/emerge
Normal file
26
Git/mingw64/libexec/git-core/mergetools/emerge
Normal file
@ -0,0 +1,26 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" -f emerge-files-command "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" \
|
||||
-f emerge-files-with-ancestor-command \
|
||||
"$LOCAL" "$REMOTE" "$BASE" \
|
||||
"$(basename "$MERGED")"
|
||||
else
|
||||
"$merge_tool_path" \
|
||||
-f emerge-files-command \
|
||||
"$LOCAL" "$REMOTE" \
|
||||
"$(basename "$MERGED")"
|
||||
fi
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
echo emacs
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
16
Git/mingw64/libexec/git-core/mergetools/examdiff
Normal file
16
Git/mingw64/libexec/git-core/mergetools/examdiff
Normal file
@ -0,0 +1,16 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" -nh
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
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
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
mergetool_find_win32_cmd "ExamDiff.com" "ExamDiff Pro"
|
||||
}
|
18
Git/mingw64/libexec/git-core/mergetools/guiffy
Normal file
18
Git/mingw64/libexec/git-core/mergetools/guiffy
Normal file
@ -0,0 +1,18 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" -s "$LOCAL" \
|
||||
"$REMOTE" "$BASE" "$MERGED"
|
||||
else
|
||||
"$merge_tool_path" -m "$LOCAL" \
|
||||
"$REMOTE" "$MERGED"
|
||||
fi
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
1
Git/mingw64/libexec/git-core/mergetools/gvimdiff
Normal file
1
Git/mingw64/libexec/git-core/mergetools/gvimdiff
Normal file
@ -0,0 +1 @@
|
||||
. "$MERGE_TOOLS_DIR/vimdiff"
|
1
Git/mingw64/libexec/git-core/mergetools/gvimdiff2
Normal file
1
Git/mingw64/libexec/git-core/mergetools/gvimdiff2
Normal file
@ -0,0 +1 @@
|
||||
. "$MERGE_TOOLS_DIR/vimdiff"
|
1
Git/mingw64/libexec/git-core/mergetools/gvimdiff3
Normal file
1
Git/mingw64/libexec/git-core/mergetools/gvimdiff3
Normal file
@ -0,0 +1 @@
|
||||
. "$MERGE_TOOLS_DIR/vimdiff"
|
27
Git/mingw64/libexec/git-core/mergetools/kdiff3
Normal file
27
Git/mingw64/libexec/git-core/mergetools/kdiff3
Normal file
@ -0,0 +1,27 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" \
|
||||
--L1 "$MERGED (A)" --L2 "$MERGED (B)" \
|
||||
"$LOCAL" "$REMOTE" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" --auto \
|
||||
--L1 "$MERGED (Base)" \
|
||||
--L2 "$MERGED (Local)" \
|
||||
--L3 "$MERGED (Remote)" \
|
||||
-o "$MERGED" "$BASE" "$LOCAL" "$REMOTE" \
|
||||
>/dev/null 2>&1
|
||||
else
|
||||
"$merge_tool_path" --auto \
|
||||
--L1 "$MERGED (Local)" \
|
||||
--L2 "$MERGED (Remote)" \
|
||||
-o "$MERGED" "$LOCAL" "$REMOTE" \
|
||||
>/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
11
Git/mingw64/libexec/git-core/mergetools/kompare
Normal file
11
Git/mingw64/libexec/git-core/mergetools/kompare
Normal file
@ -0,0 +1,11 @@
|
||||
can_merge () {
|
||||
return 1
|
||||
}
|
||||
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
36
Git/mingw64/libexec/git-core/mergetools/meld
Normal file
36
Git/mingw64/libexec/git-core/mergetools/meld
Normal file
@ -0,0 +1,36 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if test -z "${meld_has_output_option:+set}"
|
||||
then
|
||||
check_meld_for_output_version
|
||||
fi
|
||||
|
||||
if test "$meld_has_output_option" = true
|
||||
then
|
||||
"$merge_tool_path" --output="$MERGED" \
|
||||
"$LOCAL" "$BASE" "$REMOTE"
|
||||
else
|
||||
"$merge_tool_path" "$LOCAL" "$MERGED" "$REMOTE"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check whether we should use 'meld --output <file>'
|
||||
check_meld_for_output_version () {
|
||||
meld_path="$(git config mergetool.meld.path)"
|
||||
meld_path="${meld_path:-meld}"
|
||||
|
||||
if meld_has_output_option=$(git config --bool mergetool.meld.hasOutput)
|
||||
then
|
||||
: use configured value
|
||||
elif "$meld_path" --help 2>&1 |
|
||||
grep -e '--output=' -e '\[OPTION\.\.\.\]' >/dev/null
|
||||
then
|
||||
: old ones mention --output and new ones just say OPTION...
|
||||
meld_has_output_option=true
|
||||
else
|
||||
meld_has_output_option=false
|
||||
fi
|
||||
}
|
14
Git/mingw64/libexec/git-core/mergetools/opendiff
Normal file
14
Git/mingw64/libexec/git-core/mergetools/opendiff
Normal file
@ -0,0 +1,14 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" | cat
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" \
|
||||
-ancestor "$BASE" -merge "$MERGED" | cat
|
||||
else
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE" \
|
||||
-merge "$MERGED" | cat
|
||||
fi
|
||||
}
|
36
Git/mingw64/libexec/git-core/mergetools/p4merge
Normal file
36
Git/mingw64/libexec/git-core/mergetools/p4merge
Normal file
@ -0,0 +1,36 @@
|
||||
diff_cmd () {
|
||||
empty_file=
|
||||
|
||||
# p4merge does not like /dev/null
|
||||
if test "/dev/null" = "$LOCAL"
|
||||
then
|
||||
LOCAL="$(create_empty_file)"
|
||||
fi
|
||||
if test "/dev/null" = "$REMOTE"
|
||||
then
|
||||
REMOTE="$(create_empty_file)"
|
||||
fi
|
||||
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
|
||||
if test -n "$empty_file"
|
||||
then
|
||||
rm -f "$empty_file"
|
||||
fi
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if ! $base_present
|
||||
then
|
||||
cp -- "$LOCAL" "$BASE"
|
||||
create_virtual_base "$BASE" "$REMOTE"
|
||||
fi
|
||||
"$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
|
||||
}
|
||||
|
||||
create_empty_file () {
|
||||
empty_file="${TMPDIR:-/tmp}/git-difftool-p4merge-empty-file.$$"
|
||||
>"$empty_file"
|
||||
|
||||
printf "%s" "$empty_file"
|
||||
}
|
16
Git/mingw64/libexec/git-core/mergetools/tkdiff
Normal file
16
Git/mingw64/libexec/git-core/mergetools/tkdiff
Normal file
@ -0,0 +1,16 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" -a "$BASE" -o "$MERGED" "$LOCAL" "$REMOTE"
|
||||
else
|
||||
"$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"
|
||||
fi
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
32
Git/mingw64/libexec/git-core/mergetools/tortoisemerge
Normal file
32
Git/mingw64/libexec/git-core/mergetools/tortoisemerge
Normal file
@ -0,0 +1,32 @@
|
||||
can_diff () {
|
||||
return 1
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
basename="$(basename "$merge_tool_path" .exe)"
|
||||
if test "$basename" = "tortoisegitmerge"
|
||||
then
|
||||
"$merge_tool_path" \
|
||||
-base "$BASE" -mine "$LOCAL" \
|
||||
-theirs "$REMOTE" -merged "$MERGED"
|
||||
else
|
||||
"$merge_tool_path" \
|
||||
-base:"$BASE" -mine:"$LOCAL" \
|
||||
-theirs:"$REMOTE" -merged:"$MERGED"
|
||||
fi
|
||||
else
|
||||
echo "$merge_tool_path cannot be used without a base" 1>&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
if type tortoisegitmerge >/dev/null 2>/dev/null
|
||||
then
|
||||
echo tortoisegitmerge
|
||||
else
|
||||
echo tortoisemerge
|
||||
fi
|
||||
}
|
48
Git/mingw64/libexec/git-core/mergetools/vimdiff
Normal file
48
Git/mingw64/libexec/git-core/mergetools/vimdiff
Normal file
@ -0,0 +1,48 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" -R -f -d \
|
||||
-c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
case "$1" in
|
||||
gvimdiff|vimdiff)
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" -f -d -c '4wincmd w | wincmd J' \
|
||||
"$LOCAL" "$BASE" "$REMOTE" "$MERGED"
|
||||
else
|
||||
"$merge_tool_path" -f -d -c 'wincmd l' \
|
||||
"$LOCAL" "$MERGED" "$REMOTE"
|
||||
fi
|
||||
;;
|
||||
gvimdiff2|vimdiff2)
|
||||
"$merge_tool_path" -f -d -c 'wincmd l' \
|
||||
"$LOCAL" "$MERGED" "$REMOTE"
|
||||
;;
|
||||
gvimdiff3|vimdiff3)
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" -f -d -c 'hid | hid | hid' \
|
||||
"$LOCAL" "$REMOTE" "$BASE" "$MERGED"
|
||||
else
|
||||
"$merge_tool_path" -f -d -c 'hid | hid' \
|
||||
"$LOCAL" "$REMOTE" "$MERGED"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
case "$1" in
|
||||
gvimdiff|gvimdiff2|gvimdiff3)
|
||||
echo gvim
|
||||
;;
|
||||
vimdiff|vimdiff2|vimdiff3)
|
||||
echo vim
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
exit_code_trustable () {
|
||||
true
|
||||
}
|
1
Git/mingw64/libexec/git-core/mergetools/vimdiff2
Normal file
1
Git/mingw64/libexec/git-core/mergetools/vimdiff2
Normal file
@ -0,0 +1 @@
|
||||
. "$MERGE_TOOLS_DIR/vimdiff"
|
1
Git/mingw64/libexec/git-core/mergetools/vimdiff3
Normal file
1
Git/mingw64/libexec/git-core/mergetools/vimdiff3
Normal file
@ -0,0 +1 @@
|
||||
. "$MERGE_TOOLS_DIR/vimdiff"
|
15
Git/mingw64/libexec/git-core/mergetools/winmerge
Normal file
15
Git/mingw64/libexec/git-core/mergetools/winmerge
Normal file
@ -0,0 +1,15 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" -u -e "$LOCAL" "$REMOTE"
|
||||
return 0
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
# mergetool.winmerge.trustExitCode is implicitly false.
|
||||
# touch $BACKUP so that we can check_unchanged.
|
||||
"$merge_tool_path" -u -e -dl Local -dr Remote \
|
||||
"$LOCAL" "$REMOTE" "$MERGED"
|
||||
}
|
||||
|
||||
translate_merge_tool_path() {
|
||||
mergetool_find_win32_cmd "WinMergeU.exe" "WinMerge"
|
||||
}
|
23
Git/mingw64/libexec/git-core/mergetools/xxdiff
Normal file
23
Git/mingw64/libexec/git-core/mergetools/xxdiff
Normal file
@ -0,0 +1,23 @@
|
||||
diff_cmd () {
|
||||
"$merge_tool_path" \
|
||||
-R 'Accel.Search: "Ctrl+F"' \
|
||||
-R 'Accel.SearchForward: "Ctrl+G"' \
|
||||
"$LOCAL" "$REMOTE"
|
||||
}
|
||||
|
||||
merge_cmd () {
|
||||
if $base_present
|
||||
then
|
||||
"$merge_tool_path" -X --show-merged-pane \
|
||||
-R 'Accel.SaveAsMerged: "Ctrl+S"' \
|
||||
-R 'Accel.Search: "Ctrl+F"' \
|
||||
-R 'Accel.SearchForward: "Ctrl+G"' \
|
||||
--merged-file "$MERGED" "$LOCAL" "$BASE" "$REMOTE"
|
||||
else
|
||||
"$merge_tool_path" -X $extra \
|
||||
-R 'Accel.SaveAsMerged: "Ctrl+S"' \
|
||||
-R 'Accel.Search: "Ctrl+F"' \
|
||||
-R 'Accel.SearchForward: "Ctrl+G"' \
|
||||
--merged-file "$MERGED" "$LOCAL" "$REMOTE"
|
||||
fi
|
||||
}
|
Reference in New Issue
Block a user