From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web12.4785.1587570416056232760 for ; Wed, 22 Apr 2020 08:46:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=BdpVT4pp; spf=pass (domain: nuviainc.com, ip: 209.85.221.41, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f41.google.com with SMTP id j1so3004673wrt.1 for ; Wed, 22 Apr 2020 08:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pgjTEWpXtHOAnGSwDLaIACRj4tan6RoRHwBRVk8PP+4=; b=BdpVT4ppTabvM6TXs9j7HXhxyzLv6qy9T7VwNAgP2ptSKuDY+Ts/ll1eeg6nT3JqbZ PqbXkKELR9hQgON74QxNDpQm9UF1/qXEIOnACeP5sbaie4IRyF2WtPYatXOh02J91Yml T6OSapc9RyXLjU3RgMK55iiiAuDfCanO6ytDgWjLid9psZZTmen/gf8Juac0H70Y11Oo fGUOuueJP0ExstWuZzUcM3EL58NC6+SwFgpwHyRSb2SzxukdmKJPV5h5OMXu45jpwWyE WxsCPYZT7UIq/x/fzBL9f7CUovsVHUXoRReIqNahfmSrvzhTF+tfWEOZVAJdGs7IyfMz VC4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pgjTEWpXtHOAnGSwDLaIACRj4tan6RoRHwBRVk8PP+4=; b=Y1uvOchxJzd5k6+6BW03IfPD469owmkbf0FzVLm58J+SvfRUA2Kei9OIlewKRWnShY /tKj0hR/9UlmD+/qvL92HzwZSyEqHbm4ja7pJTy/ZJlMSp+6F2FyhgWqWJ8tBAy/lJZb K6dkV/hABPbTKcIj+bpYZfda4r6yKzxQv3QOqIdnb/14UWjmaovjQ6tW6JAhu5AWBsMG aEHOX96MlPY+hlp+WwvZSHHDm0sBJeSJmseSGujYmRc2zZlE6QUqv7UcAC6F+1622kWy a0L1kT6ZJ3+GEvXbs/zm+Sh9YtgmVTMr8BdLsIl33mfb50WM4p465qmYTPzN23ubkKvM g33Q== X-Gm-Message-State: AGi0PubFaXzpLNTLp1UweGlEdseTmg76alrPXpZz8fKsj8oC1YmU+OKD aXsJe64mhibTSJpfHXqB6dAbQ199QrCrybyOnSjXDIfproFFqAHGozTIJvf9SgN2JosclPAA6zM J+jJXqKy0nNY1ypf+ONqOkl5MV66S3axxW2FqqH6nxvUfCO014lDopcCpBEKs1zA= X-Google-Smtp-Source: APiQypILf+tj+Rfay8QPBR4Q0kNLQCwvYAXQ+bWfjEYi8eXKOMpUdDtPzIo8cxy3s2ewogistWlv4A== X-Received: by 2002:adf:fc4f:: with SMTP id e15mr30581187wrs.415.1587570414180; Wed, 22 Apr 2020 08:46:54 -0700 (PDT) Return-Path: Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id s18sm9438977wra.94.2020.04.22.08.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 08:46:53 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Andrew Fish , Laszlo Ersek , Michael D Kinney , Bob Feng , Liming Gao Subject: [PATCH 1/1] BaseTools: convert diff.order to LF-only Date: Wed, 22 Apr 2020 16:46:52 +0100 Message-Id: <20200422154652.3853-1-leif@nuviainc.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, 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 Cc: Liming Gao Signed-off-by: Leif Lindholm --- 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