From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 080381F5A0 for ; Sat, 4 Feb 2023 08:09:37 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; secure) header.d=web.de header.i=@web.de header.a=rsa-sha256 header.s=s29768273 header.b=s9QoNfoK; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231665AbjBDIJS (ORCPT ); Sat, 4 Feb 2023 03:09:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjBDIJR (ORCPT ); Sat, 4 Feb 2023 03:09:17 -0500 X-Greylist: delayed 312 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 04 Feb 2023 00:09:15 PST Received: from mout.web.de (mout.web.de [212.227.15.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28C3B144B7 for ; Sat, 4 Feb 2023 00:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1675498153; bh=FylgcssI9jiFF7sGkQbVdxp+McfBfOt0elhHOfzeEiY=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=s9QoNfoKXqAlvj/RmwtUukO04shKGegMNjMm8xHDeR1/ujSdN89i0U5uMhoagfmhh O0aj7DzoSaR/coILlbyo9NguIZ5K1bIS5oXPemhmLrn8hjCI/GJnJSJQKgEFd3Rvpz 7bDtviXJtyACggdUet1puCdq0G/HjqEXJllnAXzUcj7HHUw1srMSbPnOesjOLsF1wS yHVdG9jlQK9KnpCL74G/bAiYcuwMi6BhGAAnQre/7LrymBA91DlMNApgAUfiH5CJaP MsbSiFvNj7a7T5de3CFhK0LdIO9PZXUfj4w5BmdpiEfrvHnflDiGeTBMf509RlYRVZ 6DO4Xm9z6H0RQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from localhost ([62.20.115.19]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MOlwp-1oyi1i3m75-00QDCm; Sat, 04 Feb 2023 09:03:50 +0100 Date: Sat, 4 Feb 2023 09:03:48 +0100 From: Torsten =?iso-8859-1?Q?B=F6gershausen?= To: Philip Oakley Cc: git@vger.kernel.org, Junio C Hamano , Johannes Sixt , "brian m . carlson" Subject: Re: [PATCH] .gitattributes: include `text` attribute for eol attributes Message-ID: <20230204080348.vqrxsk7ze6bcz4nf@tb-raspi4> References: <20220216115239.uo2ie3flaqo3nf2d@tb-raspi4> <20230203125920.751-1-philipoakley@iee.email> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230203125920.751-1-philipoakley@iee.email> User-Agent: NeoMutt/20170113 (1.7.2) X-Provags-ID: V03:K1:ZBuYMKtJOJCvil5ndIY44qJRTlgOUEQoTVXLo9WiEiISBp1y7J0 sTCF9kHXDf6oad6tUcan1w3Lhg5HbBEiVFKXpN/dtO+k7QiiziboSWoNc5qAJ65e8Gk2Rar Ztf+p3/qb07ONRMs/Jbo3efmTC/n2R0F/nLnLq1+/tc+2RulJxkwXEBUxc4qGojI9TepBDh ygtPvRASunznPtKo3gyOQ== UI-OutboundReport: notjunk:1;M01:P0:AJvf4qHm9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org On Fri, Feb 03, 2023 at 12:59:20PM +0000, Philip Oakley wrote: > The standard advice for text file eol endings in the .gitattributes file > was updated in e28eae3184 (gitattributes: Document the unified "auto" > handling, 2016-08-26) with a recent clarification in 8c591dbfce (docs: > correct documentation about eol attribute, 2022-01-11), with a follow > up comment by the original author in [1] confirming the use of the eol > attribute in conjunction with the text attribute. > > Update Git's .gitattributes file to reflect our own advice. > > [1] https://lore.kernel.org/git/?q=3D%3C20220216115239.uo2ie3flaqo3nf2d%= 40tb-raspi4%3E. > > Signed-off-by: Philip Oakley > --- > > I was catching up on last year's back emails, and had saved those on > eol and text conversion, and was prompted by Torsten's [1] to check > my .gitattribute files, only to discover, we aren't providing a good > example to others. Let's fix that. > > > .gitattributes | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/.gitattributes b/.gitattributes > index b0044cf272..158c3d45c4 100644 > --- a/.gitattributes > +++ b/.gitattributes > @@ -1,17 +1,17 @@ > * whitespace=3D!indent,trail,space > *.[ch] whitespace=3Dindent,trail,space diff=3Dcpp > -*.sh whitespace=3Dindent,trail,space eol=3Dlf > -*.perl eol=3Dlf diff=3Dperl > -*.pl eof=3Dlf diff=3Dperl > -*.pm eol=3Dlf diff=3Dperl > -*.py eol=3Dlf diff=3Dpython > -*.bat eol=3Dcrlf > +*.sh whitespace=3Dindent,trail,space text eol=3Dlf > +*.perl text eol=3Dlf diff=3Dperl > +*.pl text eof=3Dlf diff=3Dperl > +*.pm text eol=3Dlf diff=3Dperl > +*.py text eol=3Dlf diff=3Dpython In my eperience python doesn't care about CRLF or LF, both work. And it is stated here: https://docs.python.org/3/reference/lexical_analysis.html?highlight=3Dline= %20endings In that sense we can loosen the eol=3Dlf, and use CRLF under Windows and LF elsewhere. This will make e.g. notepad users happy: > +*.py text diff=3Dpython