git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: David Aguilar <davvid@gmail.com>, Phil Susi <phillsusi@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Philip Oakley <philipoakley@iee.org>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] mergetools: add winmerge as a builtin tool
Date: Wed, 13 May 2015 17:22:23 +0200	[thread overview]
Message-ID: <3d7e3b09b89c46c39befca7564f5c1d6@www.dscho.org> (raw)
In-Reply-To: <55534F4E.60402@gmail.com>

Hi,

On 2015-05-13 15:19, Sebastian Schuberth wrote:
> On 13.05.2015 04:00, David Aguilar wrote:
> 
>> +	if test -n "$ProgramW6432" && test -x "$ProgramW6432/$winmerge_exe"
>> +	then
>> +		printf '%s' "$ProgramW6432/$winmerge_exe"
> 
> I don't think it makes sense to check "$ProgramW6432". The content of
> that variable depends on the bitness of the process requesting the
> environment. Just checking "$PROGRAMFILES" and "$PROGRAMFILES(X86)"
> should be sufficient and more clear.

In my tests, "$PROGRAMFILES(X86)" did *not* work:

    $ echo "$PROGRAMFILES(X86)"
    bash: syntax error near unexpected token `('

> Also, note that you should use all upper case names when referring to
> Windows environment variables. While it's true that on plain Windows
> environment variable names are case-insensitive, MSYS1/2 converts all
> variable names to upper case and *is* case sensitive. I.e. while "echo
> $PROGRAMFILES" works as expected from a Git Bash on Windows, "echo
> $ProgramFiles" results in an empty string.

Exactly. In my tests, "$ProgramW6432" worked, while "$PROGRAMW6432" did not.

FWIW I think that the idea to test for a WinMerge executable of another bitness makes sense, because we can execute an executable of another bitness (unlike a .dll of another bitness).

Ciao,
Johannes

  reply	other threads:[~2015-05-13 15:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13  2:00 [PATCH v2] mergetools: add winmerge as a builtin tool David Aguilar
2015-05-13  8:10 ` Johannes Schindelin
2015-05-13 13:19 ` Sebastian Schuberth
2015-05-13 15:22   ` Johannes Schindelin [this message]
2015-05-13 15:33     ` Sebastian Schuberth
2015-05-13 20:00       ` Sebastian Schuberth
2015-05-13 20:36         ` Sebastian Schuberth
2015-05-13 20:37           ` Sebastian Schuberth
2015-05-14 21:48             ` SZEDER Gábor
2015-05-15  5:46               ` Sebastian Schuberth
2015-05-15  9:01                 ` SZEDER Gábor
2015-05-14 21:24       ` SZEDER Gábor
2015-05-15  5:40         ` Sebastian Schuberth
2015-05-20  4:10           ` David Aguilar

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d7e3b09b89c46c39befca7564f5c1d6@www.dscho.org \
    --to=johannes.schindelin@gmx.de \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=philipoakley@iee.org \
    --cc=phillsusi@gmail.com \
    --cc=sschuberth@gmail.com \
    /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.
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 NNTP newsgroup(s).