From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Cc: Git List <git@vger.kernel.org>, pudinha <rogi@skylittlesystem.org>
Subject: Re: [BUG] Regression in 'git mergetool --tool-help'
Date: Sat, 19 Dec 2020 21:13:21 -0500 [thread overview]
Message-ID: <c4f2330f-715b-1745-5ad7-5477f4e833db@gmail.com> (raw)
In-Reply-To: <xmqqsg81pvm8.fsf@gitster.c.googlers.com>
Hi Junio,
Hi Felipe,
Le 2020-12-19 à 12:13, Junio C Hamano a écrit :
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> Junio C Hamano wrote:
>>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>>> 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.
>>
Thanks for both answers. Felipe's solution does the trick, but Junio's does not;
it seems we do have to have a newline there. The following also works, and I think
is portable:
diff --git i/git-mergetool--lib.sh w/git-mergetool--lib.sh
index 2defef28cd..6f03975493 100644
--- i/git-mergetool--lib.sh
+++ w/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="$(echo "$variants" && list_tool_variants)"
done
variants="$(echo "$variants" | sort | uniq)"
I figured out what was different between the different Ubuntu versions I was testing:
the Ubuntu 14 and 18 systems have Bash as /bin/sh, but my Ubuntu 20 system
has /usr/bin/dash as /bin/sh (the default for Ubuntu these days).
I'll try to send a formal patch with the diff above, time permitting...
Also of note: I was wondering why 'araxis' was showing up in the list of available tools,
as Araxis Merge is macOS and Windows only (!). Turns out that the imagemagick package installs
a /usr/bin/compare symlink to /usr/bin/compare-im6.q16, so since Araxis merge is registered in
mergetools/araxis::translate_merge_tool_path as 'compare', it ends up in the list of available
merge tools... I think we could do better here but I'm not sure how.
Cheers,
Philippe.
next prev parent reply other threads:[~2020-12-20 2:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-19 4:23 [BUG] Regression in 'git mergetool --tool-help' Philippe Blain
2020-12-19 4:50 ` Felipe Contreras
2020-12-19 5:33 ` Junio C Hamano
2020-12-19 12:10 ` Felipe Contreras
2020-12-19 17:13 ` Junio C Hamano
2020-12-20 2:13 ` Philippe Blain [this message]
2020-12-20 10:28 ` Johannes Sixt
2020-12-20 16:23 ` René Scharfe
2020-12-20 18:11 ` Junio C Hamano
2020-12-20 23:47 ` Philippe Blain
2020-12-21 0:41 ` Junio C Hamano
2020-12-20 15:34 ` Junio C Hamano
2020-12-19 5:16 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4f2330f-715b-1745-5ad7-5477f4e833db@gmail.com \
--to=levraiphilippeblain@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rogi@skylittlesystem.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).