Re: [BUG] Regression in 'git mergetool --tool-help'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 19, 2020, 05:33 UTC
- Message-ID
- <xmqqczz6qs0p.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAMP44s15CJVGRg5Qxcgqq8xVkDhpVyxND67-iQZF9uZ_PRstEQ@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 24 quoted lines
> On Fri, Dec 18, 2020 at 10:27 PM Philippe Blain
> <levraiphilippeblain@gmail.com> wrote:
>
>> It seems that 83bbf9b92e (mergetool--lib: improve support for
>> vimdiff-style tool variants,
>> 2020-07-29) introduced a regression in the output shown by 'git
>> mergetool --tool-help'.
>> Even if I have 'meld', 'kdiff3' and 'xxdiff' installed and in PATH,
>> they are not shown at all when
>> the above command is invoked. Only vimdiff, gvimdiff and their *2 and
>> *3 variants are listed.
>
> How about this?
>
> --- a/git-mergetool--lib.sh
> +++ b/git-mergetool--lib.sh
> @@ -46,7 +46,7 @@ show_tool_names () {
> while read scriptname
> do
> setup_tool "$scriptname" 2>/dev/null
> - variants="$variants$(list_tool_variants)\n"
> + variants="$variants$(list_tool_variants)"$'\n'
> done
> variants="$(echo "$variants" | sort | uniq)"Ah, I didn't see your variant before sending mine. $'\n' would work with bash but we prefer not to rely on bashisms here.