public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: devel@edk2.groups.io
Cc: Andrew Fish <afish@apple.com>, Laszlo Ersek <lersek@redhat.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Bob Feng <bob.c.feng@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: [PATCH 1/1] BaseTools: convert diff.order to LF-only
Date: Wed, 22 Apr 2020 16:46:52 +0100	[thread overview]
Message-ID: <20200422154652.3853-1-leif@nuviainc.com> (raw)

SetupGit.py sets the git config option diff.orderFile to
{edk2 directory}/BaseTools/Conf/diff.order, to override the default order
in which files are shown in a diff/patch/whatever. This is in imitation
of what is done manually in Laszlo's Unkempt Guide.

However, the version currently in the tree is in CRLF format, which makes
git interpret e.g. *.c as matching on *.c<CR>, finding no matches and
failing to apply the desired reordering. Note: this is true regardless of
whether running on Linux or Windows.

Convert the file to LF-only to make it work as expected.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---

I'm not going to reveal just how much time I wasted on this before I
figured out what was going wrong...

I am intending to start prototyping the overall CRLF->native
conversion shortly, but this needs resolving regardless, and in fact we
will need to override the line ending conversion for this file in
gitattributes. 

Arguably, the same logic could be applied to the gitattributes file
itself (in the same directory), but since every effective line in that
has an explicit option following the glob, it triggers no issues at
present.

This bug is quite likely also behind some accusations I've made on
people not following the correct patch submission process, for which I
apologise.

Finally, a question: did we have some way of overriding the PatchCheck.py
step in mergify? This patch gets an error per line...
If not, should I submit a separate patch adding yet another exception to
PatchCheck.py?

/
    Leif

 BaseTools/Conf/diff.order | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/BaseTools/Conf/diff.order b/BaseTools/Conf/diff.order
index 4361817012c9..f1534f6c187c 100644
--- a/BaseTools/Conf/diff.order
+++ b/BaseTools/Conf/diff.order
@@ -1,13 +1,13 @@
-#
-# Copyright (c) 2019, Linaro Ltd. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-*.dec
-*.dsc.inc
-*.dsc
-*.fdf
-*.inf
-*.h
-*.vfr
-*.c
+#
+# Copyright (c) 2019, Linaro Ltd. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+*.dec
+*.dsc.inc
+*.dsc
+*.fdf
+*.inf
+*.h
+*.vfr
+*.c
-- 
2.20.1


             reply	other threads:[~2020-04-22 15:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 15:46 Leif Lindholm [this message]
2020-04-22 16:05 ` [PATCH 1/1] BaseTools: convert diff.order to LF-only Michael D Kinney
2020-04-22 16:09   ` [edk2-devel] " Leif Lindholm
2020-04-23 11:01 ` Philippe Mathieu-Daudé
2020-04-23 12:10   ` Leif Lindholm
2020-04-24 13:30 ` Laszlo Ersek
2020-04-27 15:44   ` [edk2-devel] " Liming Gao
2020-04-27 16:22     ` Michael D Kinney
2020-04-27 17:06       ` Leif Lindholm
2020-04-27 16:53     ` Leif Lindholm
2020-04-30 14:46       ` Laszlo Ersek

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-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422154652.3853-1-leif@nuviainc.com \
    --to=devel@edk2.groups.io \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox