Browse Source

mergetools: add description to all diff/merge tools

The output of `git mergetool --tool-help` and `git difftool --tool-help`
only showed the `alias` of each available merge/diff tool.

It is not always obvious what tool these `aliases` end up using (ex:
`opendiff` runs `FileMerge` and `bc` runs `Beyond Compare`).

This commit adds a short description to each of them to help the user
identify the `alias` they want.

Signed-off-by: Fernando Ramos <greenfoo@u92.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pull/1040/head
Fernando Ramos 5 months ago committed by Junio C Hamano
parent
commit
980145f747
  1. 8
      mergetools/araxis
  2. 8
      mergetools/bc
  3. 8
      mergetools/codecompare
  4. 8
      mergetools/deltawalker
  5. 8
      mergetools/diffmerge
  6. 8
      mergetools/diffuse
  7. 8
      mergetools/ecmerge
  8. 8
      mergetools/emerge
  9. 8
      mergetools/examdiff
  10. 8
      mergetools/guiffy
  11. 8
      mergetools/kdiff3
  12. 8
      mergetools/kompare
  13. 8
      mergetools/meld
  14. 8
      mergetools/opendiff
  15. 8
      mergetools/p4merge
  16. 8
      mergetools/smerge
  17. 8
      mergetools/tkdiff
  18. 8
      mergetools/tortoisemerge
  19. 8
      mergetools/winmerge
  20. 8
      mergetools/xxdiff

8
mergetools/araxis

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" -wait -2 "$LOCAL" "$REMOTE" >/dev/null 2>&1
}
diff_cmd_help () {
echo "Use Araxis Merge (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -13,6 +17,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use Araxis Merge (requires a graphical session)"
}
translate_merge_tool_path() {
echo compare
}

8
mergetools/bc

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE"
}
diff_cmd_help () {
echo "Use Beyond Compare (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -13,6 +17,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use Beyond Compare (requires a graphical session)"
}
translate_merge_tool_path() {
if type bcomp >/dev/null 2>/dev/null
then

8
mergetools/codecompare

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE"
}
diff_cmd_help () {
echo "Use Code Compare (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -13,6 +17,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use Code Compare (requires a graphical session)"
}
translate_merge_tool_path() {
if merge_mode
then

8
mergetools/deltawalker

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
}
diff_cmd_help () {
echo "Use DeltaWalker (requires a graphical session)"
}
merge_cmd () {
# Adding $(pwd)/ in front of $MERGED should not be necessary.
# However without it, DeltaWalker (at least v1.9.8 on Windows)
@ -16,6 +20,10 @@ merge_cmd () {
fi >/dev/null 2>&1
}
merge_cmd_help () {
echo "Use DeltaWalker (requires a graphical session)"
}
translate_merge_tool_path () {
echo DeltaWalker
}

8
mergetools/diffmerge

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
}
diff_cmd_help () {
echo "Use DiffMerge (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -13,6 +17,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use DiffMerge (requires a graphical session)"
}
exit_code_trustable () {
true
}

8
mergetools/diffuse

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE" | cat
}
diff_cmd_help () {
echo "Use Diffuse (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -13,3 +17,7 @@ merge_cmd () {
"$LOCAL" "$MERGED" "$REMOTE" | cat
fi
}
merge_cmd_help () {
echo "Use Diffuse (requires a graphical session)"
}

8
mergetools/ecmerge

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" --default --mode=diff2 "$LOCAL" "$REMOTE"
}
diff_cmd_help () {
echo "Use ECMerge (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -12,3 +16,7 @@ merge_cmd () {
--default --mode=merge2 --to="$MERGED"
fi
}
merge_cmd_help () {
echo "Use ECMerge (requires a graphical session)"
}

8
mergetools/emerge

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" -f emerge-files-command "$LOCAL" "$REMOTE"
}
diff_cmd_help () {
echo "Use Emacs' Emerge"
}
merge_cmd () {
if $base_present
then
@ -17,6 +21,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use Emacs' Emerge"
}
translate_merge_tool_path() {
echo emacs
}

8
mergetools/examdiff

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE" -nh
}
diff_cmd_help () {
echo "Use ExamDiff Pro (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -11,6 +15,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use ExamDiff Pro (requires a graphical session)"
}
translate_merge_tool_path() {
mergetool_find_win32_cmd "ExamDiff.com" "ExamDiff Pro"
}

8
mergetools/guiffy

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE"
}
diff_cmd_help () {
echo "Use Guiffy's Diff Tool (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -13,6 +17,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use Guiffy's Diff Tool (requires a graphical session)"
}
exit_code_trustable () {
true
}

8
mergetools/kdiff3

@ -4,6 +4,10 @@ diff_cmd () {
"$LOCAL" "$REMOTE" >/dev/null 2>&1
}
diff_cmd_help () {
echo "Use KDiff3 (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -22,6 +26,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use KDiff3 (requires a graphical session)"
}
exit_code_trustable () {
true
}

8
mergetools/kompare

@ -2,10 +2,18 @@ can_merge () {
return 1
}
diff_cmd_help () {
echo "Use Kompare (requires a graphical session)"
}
diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE"
}
merge_cmd_help () {
echo "Use Kompare (requires a graphical session)"
}
exit_code_trustable () {
true
}

8
mergetools/meld

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE"
}
diff_cmd_help () {
echo "Use Meld (requires a graphical session)"
}
merge_cmd () {
check_meld_for_features
@ -20,6 +24,10 @@ merge_cmd () {
fi
}
merge_cmd_help () {
echo "Use Meld (requires a graphical session) with optional \`auto merge\` (see \`git help mergetool\`'s \`CONFIGURATION\` section)"
}
# Get meld help message
init_meld_help_msg () {
if test -z "$meld_help_msg"

8
mergetools/opendiff

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE" | cat
}
diff_cmd_help () {
echo "Use FileMerge (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -12,3 +16,7 @@ merge_cmd () {
-merge "$MERGED" | cat
fi
}
merge_cmd_help () {
echo "Use FileMerge (requires a graphical session)"
}

8
mergetools/p4merge

@ -19,6 +19,10 @@ diff_cmd () {
fi
}
diff_cmd_help () {
echo "Use HelixCore P4Merge (requires a graphical session)"
}
merge_cmd () {
if ! $base_present
then
@ -34,3 +38,7 @@ create_empty_file () {
printf "%s" "$empty_file"
}
merge_cmd_help () {
echo "Use HelixCore P4Merge (requires a graphical session)"
}

8
mergetools/smerge

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" mergetool "$LOCAL" "$REMOTE" -o "$MERGED"
}
diff_cmd_help () {
echo "Use Sublime Merge (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -10,3 +14,7 @@ merge_cmd () {
"$merge_tool_path" mergetool "$LOCAL" "$REMOTE" -o "$MERGED"
fi
}
merge_cmd_help () {
echo "Use Sublime Merge (requires a graphical session)"
}

8
mergetools/tkdiff

@ -2,6 +2,10 @@ diff_cmd () {
"$merge_tool_path" "$LOCAL" "$REMOTE"
}
diff_cmd_help () {
echo "Use TkDiff (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -14,3 +18,7 @@ merge_cmd () {
exit_code_trustable () {
true
}
merge_cmd_help () {
echo "Use TkDiff (requires a graphical session)"
}

8
mergetools/tortoisemerge

@ -2,6 +2,10 @@ can_diff () {
return 1
}
diff_cmd_help () {
echo "Use TortoiseMerge (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -30,3 +34,7 @@ translate_merge_tool_path() {
echo tortoisemerge
fi
}
merge_cmd_help () {
echo "Use TortoiseMerge (requires a graphical session)"
}

8
mergetools/winmerge

@ -3,6 +3,10 @@ diff_cmd () {
return 0
}
diff_cmd_help () {
echo "Use WinMerge (requires a graphical session)"
}
merge_cmd () {
# mergetool.winmerge.trustExitCode is implicitly false.
# touch $BACKUP so that we can check_unchanged.
@ -13,3 +17,7 @@ merge_cmd () {
translate_merge_tool_path() {
mergetool_find_win32_cmd "WinMergeU.exe" "WinMerge"
}
merge_cmd_help () {
echo "Use WinMerge (requires a graphical session)"
}

8
mergetools/xxdiff

@ -12,6 +12,10 @@ diff_cmd () {
fi
}
diff_cmd_help () {
echo "Use xxdiff (requires a graphical session)"
}
merge_cmd () {
if $base_present
then
@ -28,3 +32,7 @@ merge_cmd () {
--merged-file "$MERGED" "$LOCAL" "$REMOTE"
fi
}
merge_cmd_help () {
echo "Use xxdiff (requires a graphical session)"
}

Loading…
Cancel
Save