git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: js/drop-mingw-test-cmp, was Re: What's cooking in git.git (Dec 2022, #03; Sun, 11)
Date: Wed, 21 Dec 2022 22:05:59 +0900	[thread overview]
Message-ID: <xmqq7cyksy88.fsf@gitster.g> (raw)
In-Reply-To: c57ecd23-7ca7-2501-983f-6661c7872a01@gmx.de

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> IIRC the review comments hinted that MinGW specific test_cmp that
>> equates CRLF and LF are no longer needed,
>
> That does not match my understanding. The MSYS2 tools we use in Git for
> Windows' SDK (and therefore, in the `win` jobs of our CI runs) are outside
> of our control, and have been known to change behavior with regards to
> line endings.

We may have been following two different threads, I suspect?

The behaviour of the platform tools may unexpectedly change without
any good reason, and you may not be able to file a bug report when
that happens.  One way to allow our tests pass in such an
environment is to make them sloppy to accomodate the potential
variation in their behaviour.  That is what the "ignore line ending"
comparison gives us.

But it means tests in MinGW environment would not notice if the
output _we_ produce from Git has unintentional changes, no?
Imagine we break the checkout codepath to write LF working tree
files when we should write CRLF, or vice versa.  A lenient test_cmp
under discussion (whether the one in the current codebase, or the
one that the patch wants to update) would not care.

I know we have been operating under such a test environment, but
after seeing the exchange between Réne and J6t, I was hoping that we
do not have to keep being sloppy.  After all, noticing unintended
behaviour changes in our code is the whole point of running tests.

Getting rid of the "ignore line ending" comparison would mean that,
while we would be able to catch _our_ bugs, we would also notice and
have to deal with unintended behaviour changes in MSYS2 tools.  But
how bad would it be?  I doubt that it would be like you update from
upstream every other week, and every other such update flips the
line endings---that would make you scramble, filing bug reports to
MSYS2 and temporarily patching our tests to be sloppier, once every
month, that may be a bit too often.

  reply	other threads:[~2022-12-21 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-11  5:18 What's cooking in git.git (Dec 2022, #03; Sun, 11) Junio C Hamano
2022-12-12  7:50 ` js/drop-mingw-test-cmp, was " Johannes Schindelin
2022-12-12 21:43   ` Junio C Hamano
2022-12-20 22:59     ` Johannes Schindelin
2022-12-21 13:05       ` Junio C Hamano [this message]
2022-12-24  8:10         ` Johannes Sixt
2022-12-24 13:31           ` René Scharfe
2022-12-25 14:45             ` Junio C Hamano
2022-12-25 15:44             ` Johannes Sixt
2022-12-26 19:53               ` René Scharfe
2022-12-27 12:52                 ` 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=xmqq7cyksy88.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.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).