Skip to content

Commit 980145f

Browse files
greenfoogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7b5cf8b commit 980145f

File tree

20 files changed

+160
-0
lines changed

20 files changed

+160
-0
lines changed

mergetools/araxis

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" -wait -2 "$LOCAL" "$REMOTE" >/dev/null 2>&1
33
}
44

5+
diff_cmd_help () {
6+
echo "Use Araxis Merge (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -13,6 +17,10 @@ merge_cmd () {
1317
fi
1418
}
1519

20+
merge_cmd_help () {
21+
echo "Use Araxis Merge (requires a graphical session)"
22+
}
23+
1624
translate_merge_tool_path() {
1725
echo compare
1826
}

mergetools/bc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" "$LOCAL" "$REMOTE"
33
}
44

5+
diff_cmd_help () {
6+
echo "Use Beyond Compare (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -13,6 +17,10 @@ merge_cmd () {
1317
fi
1418
}
1519

20+
merge_cmd_help () {
21+
echo "Use Beyond Compare (requires a graphical session)"
22+
}
23+
1624
translate_merge_tool_path() {
1725
if type bcomp >/dev/null 2>/dev/null
1826
then

mergetools/codecompare

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" "$LOCAL" "$REMOTE"
33
}
44

5+
diff_cmd_help () {
6+
echo "Use Code Compare (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -13,6 +17,10 @@ merge_cmd () {
1317
fi
1418
}
1519

20+
merge_cmd_help () {
21+
echo "Use Code Compare (requires a graphical session)"
22+
}
23+
1624
translate_merge_tool_path() {
1725
if merge_mode
1826
then

mergetools/deltawalker

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
33
}
44

5+
diff_cmd_help () {
6+
echo "Use DeltaWalker (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
# Adding $(pwd)/ in front of $MERGED should not be necessary.
711
# However without it, DeltaWalker (at least v1.9.8 on Windows)
@@ -16,6 +20,10 @@ merge_cmd () {
1620
fi >/dev/null 2>&1
1721
}
1822

23+
merge_cmd_help () {
24+
echo "Use DeltaWalker (requires a graphical session)"
25+
}
26+
1927
translate_merge_tool_path () {
2028
echo DeltaWalker
2129
}

mergetools/diffmerge

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
33
}
44

5+
diff_cmd_help () {
6+
echo "Use DiffMerge (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -13,6 +17,10 @@ merge_cmd () {
1317
fi
1418
}
1519

20+
merge_cmd_help () {
21+
echo "Use DiffMerge (requires a graphical session)"
22+
}
23+
1624
exit_code_trustable () {
1725
true
1826
}

mergetools/diffuse

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" "$LOCAL" "$REMOTE" | cat
33
}
44

5+
diff_cmd_help () {
6+
echo "Use Diffuse (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -13,3 +17,7 @@ merge_cmd () {
1317
"$LOCAL" "$MERGED" "$REMOTE" | cat
1418
fi
1519
}
20+
21+
merge_cmd_help () {
22+
echo "Use Diffuse (requires a graphical session)"
23+
}

mergetools/ecmerge

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" --default --mode=diff2 "$LOCAL" "$REMOTE"
33
}
44

5+
diff_cmd_help () {
6+
echo "Use ECMerge (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -12,3 +16,7 @@ merge_cmd () {
1216
--default --mode=merge2 --to="$MERGED"
1317
fi
1418
}
19+
20+
merge_cmd_help () {
21+
echo "Use ECMerge (requires a graphical session)"
22+
}

mergetools/emerge

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" -f emerge-files-command "$LOCAL" "$REMOTE"
33
}
44

5+
diff_cmd_help () {
6+
echo "Use Emacs' Emerge"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -17,6 +21,10 @@ merge_cmd () {
1721
fi
1822
}
1923

24+
merge_cmd_help () {
25+
echo "Use Emacs' Emerge"
26+
}
27+
2028
translate_merge_tool_path() {
2129
echo emacs
2230
}

mergetools/examdiff

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" "$LOCAL" "$REMOTE" -nh
33
}
44

5+
diff_cmd_help () {
6+
echo "Use ExamDiff Pro (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -11,6 +15,10 @@ merge_cmd () {
1115
fi
1216
}
1317

18+
merge_cmd_help () {
19+
echo "Use ExamDiff Pro (requires a graphical session)"
20+
}
21+
1422
translate_merge_tool_path() {
1523
mergetool_find_win32_cmd "ExamDiff.com" "ExamDiff Pro"
1624
}

mergetools/guiffy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ diff_cmd () {
22
"$merge_tool_path" "$LOCAL" "$REMOTE"
33
}
44

5+
diff_cmd_help () {
6+
echo "Use Guiffy's Diff Tool (requires a graphical session)"
7+
}
8+
59
merge_cmd () {
610
if $base_present
711
then
@@ -13,6 +17,10 @@ merge_cmd () {
1317
fi
1418
}
1519

20+
merge_cmd_help () {
21+
echo "Use Guiffy's Diff Tool (requires a graphical session)"
22+
}
23+
1624
exit_code_trustable () {
1725
true
1826
}

0 commit comments

Comments
 (0)