From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 402C91F910 for ; Sat, 19 Nov 2022 08:18:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231904AbiKSISR (ORCPT ); Sat, 19 Nov 2022 03:18:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbiKSISP (ORCPT ); Sat, 19 Nov 2022 03:18:15 -0500 Received: from bsmtp1.bon.at (bsmtp1.bon.at [213.33.87.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E2C29038C for ; Sat, 19 Nov 2022 00:18:14 -0800 (PST) Received: from [192.168.0.98] (unknown [93.83.142.38]) by bsmtp1.bon.at (Postfix) with ESMTPSA id 4NDmkB1MnNz5tl9; Sat, 19 Nov 2022 09:18:09 +0100 (CET) Message-ID: <65ff24be-4392-f236-5500-ce0c0d4d42ca@kdbg.org> Date: Sat, 19 Nov 2022 09:18:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v3 2/2] tests(mingw): avoid very slow `mingw_test_cmp` Content-Language: en-US To: Junio C Hamano , Taylor Blau Cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org, =?UTF-8?Q?Ren=c3=a9_Scharfe?= , =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin References: From: Johannes Sixt In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Am 19.11.22 um 00:15 schrieb Junio C Hamano: > Taylor Blau writes: > >> One thing that the commit message doesn't allude to (that is covered in >> the earlier discussion) is why it is important to pass >> `--ignore-cr-at-eol`. I think that is worth mentioning here. > > Isn't it because Git on the platform is expected to use CRLF in > certain places, unlike on other platforms where LF is used, but the > platform port hasn't adjusted tests to match that expectation? And > vice versa, where Git is expected to produce LF terminated text > everywhere but the expected output is not "ported" to force LF > termination and instead produces CRLF terminated text on platforms > whose native line ending is CRLF? > > Use of "ignore-cr-at-eol" may allow such tests that are not ported > correctly to prepare expected output with a "wrong" line ending and > still pass, and I do think it may be an expedite way to make tests > appear to pass. The reason that mingw_test_cmp exists is not that Git isn't ported correctly, or that tests aren't ported correctly. The reason is that tests assume Unix LF line endings everywhere, but there are some tools that are outside our control that randomly -- to the layman's eye -- produce CRLF line endings even when their input has LF style. For example, when we post-process Git output with `sed`, the result suddenly has CRLF line endings instead of LF that the input had. > When Git is expected to produce platform-native line endings,... There is no such requirement or expectation on Windows. LF style is acceptable. -- Hannes