From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Thu, 04 Apr 2019 03:39:18 -0700 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62A0E316890B; Thu, 4 Apr 2019 10:39:18 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-104.rdu2.redhat.com [10.10.120.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0495E6C759; Thu, 4 Apr 2019 10:39:16 +0000 (UTC) Subject: Re: [Patch 0/4] Normalize line endings to CRLF in ARM packages To: Leif Lindholm , "Kinney, Michael D" Cc: devel@edk2.groups.io, Ard Biesheuvel , Andrew Fish References: <20190403220014.14468-1-michael.d.kinney@intel.com> <20190404035437.qcale3g5qekzb53d@bivouac.eciton.net> From: "Laszlo Ersek" Message-ID: <983adf0b-4a30-4a48-b015-502157c712f3@redhat.com> Date: Thu, 4 Apr 2019 12:39:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190404035437.qcale3g5qekzb53d@bivouac.eciton.net> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 04 Apr 2019 10:39:18 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 04/04/19 05:54, Leif Lindholm wrote: > Hi Mike, > > This looks fine. But I did have one thought: > If we're just about to touch pretty much every file in the tree anyway > - can we consider doing the full conversion to native line endings at > the same time? > > (This doesn't help the 'git blame' problem, it just reminded me.) The git-blame issue that such a conversion introduces is not terrible. Let's say you run git blame -- ArmPkg/Library/GccLto/liblto-arm.s and it gives you a commit for a specific line you care about. Let's call that commit C1. Then you do git show --color C1 | less and expect to see the commit message & patch that introduced the *logic* on that line. But, you only see a "useless" CRLF conversion, in that commit. So what do you do? Simple, repeat the process as follows: git blame C1^ -- ArmPkg/Library/GccLto/liblto-arm.s This will assign blame on the lines of the file as the file was right before C1 changed the line terminators. The problem that I think *is* worse is that, jumping about in the git history (with git checkout / git bisect), around the large conversion commit, will expose the user in a brief time to files that are both LF and CRLF encoded, internally. Therefore, whatever their local auto-conversion-on-checkout settings are, some commits in such a work session will not match those settings. For example, assuming you are on Windows, and set up LF-to-CRLF-on-checkout (as you should), then git-checkout a commit from before the "LF only" conversion commit, you might see double CRs. I guess. I never tested it. Thanks Laszlo > > / > Leif > > On Wed, Apr 03, 2019 at 03:00:10PM -0700, Kinney, Michael D wrote: >> https://bugzilla.tianocore.org/show_bug.cgi?id=1659 >> >> Normalize line endings to use CRLF to pass PatchCheck.py >> >> Cc: Leif Lindholm >> Cc: Ard Biesheuvel >> Cc: Laszlo Ersek >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Michael D Kinney >> >> Kinney, Michael D (4): >> ArmPkg/ArmScmiDxe: Remove non-ASCII character in comment >> ArmPkg: Normalize line endings to CRLF >> ArmVirtPkg: Normalize line endings to CRLF >> ArmPlatformPkg: Normalize line endings to CRLF >> >> .../ArmScmiPerformanceProtocolPrivate.h | 2 +- >> ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.c | 44 +- >> .../ArmSmcPsciResetSystemLib/AArch64/Reset.S | 60 +- >> .../AArch64/Reset.asm | 70 +- >> .../ArmSmcPsciResetSystemLib/Arm/Reset.S | 58 +- >> .../ArmSmcPsciResetSystemLib/Arm/Reset.asm | 68 +- >> ArmPkg/Library/CompilerIntrinsicsLib/memset.c | 124 ++-- >> ArmPkg/Library/GccLto/liblto-aarch64.s | 54 +- >> ArmPkg/Library/GccLto/liblto-arm.s | 122 ++-- >> ArmPlatformPkg/Scripts/Ds5/profile.py | 668 +++++++++--------- >> ArmVirtPkg/Include/Platform/Hidden.h | 56 +- >> 11 files changed, 663 insertions(+), 663 deletions(-) >> >> -- >> 2.21.0.windows.1 >>