summaryrefslogtreecommitdiff
path: root/git-mergetool--lib.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-02-05 16:31:24 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-05 16:31:24 -0800
commit64971f0ac0200d3bb53cb19e7367cf57a40ae1fc (patch)
tree4d21d1a12b56d6b2896476d97861209b31faf688 /git-mergetool--lib.sh
parentMerge branch 'ds/for-each-repo-noopfix' into maint (diff)
parentmergetool--lib: fix '--tool-help' to correctly show available tools (diff)
downloadtgif-64971f0ac0200d3bb53cb19e7367cf57a40ae1fc.tar.xz
Merge branch 'pb/mergetool-tool-help-fix' into maint
Fix 2.29 regression where "git mergetool --tool-help" fails to list all the available tools. * pb/mergetool-tool-help-fix: mergetool--lib: fix '--tool-help' to correctly show available tools
Diffstat (limited to 'git-mergetool--lib.sh')
-rw-r--r--git-mergetool--lib.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 7225abd811..78f3647ed9 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -46,9 +46,11 @@ show_tool_names () {
while read scriptname
do
setup_tool "$scriptname" 2>/dev/null
- variants="$variants$(list_tool_variants)\n"
+ # We need an actual line feed here
+ variants="$variants
+$(list_tool_variants)"
done
- variants="$(echo "$variants" | sort | uniq)"
+ variants="$(echo "$variants" | sort -u)"
for toolname in $variants
do