git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Adam Dinwoodie <adam@dinwoodie.org>
To: David Aguilar <davvid@gmail.com>
Cc: Michael Schindler via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	Michael Schindler <michael@compressconsult.com>
Subject: Re: [PATCH] use get_merge_tool_path() also in is_available() to honor settings
Date: Tue, 31 Aug 2021 12:01:23 +0100	[thread overview]
Message-ID: <CA+kUOamRLtsArhjMpo7A28=6vPabry8KsjM022gZ4nxDj0wU-Q@mail.gmail.com> (raw)
In-Reply-To: <CAJDDKr4rXEZDH4ZNU1ieUcfpOseikOVVfFQ=1tG9YNr2nibLCQ@mail.gmail.com>

On Mon, 30 Aug 2021 at 01:09, David Aguilar <davvid@gmail.com> wrote:
> I'd like to extend 47eb4c6890 (mergetools/kdiff3: make kdiff3 work on
> Windows too, 2021-06-07)
> but in order to do so I need a reliable way to special-case Windows so
> that we only do the x -> x.exe translation there.
>
> What's the best way to detect Windows? t/test-lib.sh seems to detect
> Windows using "uname -s" and
> checking for matches against *MINGW* or *CYGWIN*. Is that reliable /
> recommended?

I don't think there's a single canonical way to do this, but that's
certainly an effective way.

However I'd suggest not adding special-case code for Cygwin here, only
for MinGW: the general design principles for Cygwin are such that
*nix-native code should require minimal changes to work on Cygwin, and
in particular the Cygwin compatibility layer should look after adding
that extension, rather than requiring the application code to handle
the special case. Both approaches would work, but I think it makes
sense to follow the general Cygwin design principle here of not adding
unnecessary special casing to handle it, and to leave it to the Cygwin
compatibility layer instead.

      reply	other threads:[~2021-08-31 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 20:47 [PATCH] use get_merge_tool_path() also in is_available() to honor settings Michael Schindler via GitGitGadget
2021-06-08  1:30 ` Junio C Hamano
2021-08-30  0:08 ` David Aguilar
2021-08-31 11:01   ` Adam Dinwoodie [this message]

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='CA+kUOamRLtsArhjMpo7A28=6vPabry8KsjM022gZ4nxDj0wU-Q@mail.gmail.com' \
    --to=adam@dinwoodie.org \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=michael@compressconsult.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.
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).