public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Jordan Justen" <jordan.l.justen@intel.com>
To: Philippe Mathieu-Daudé <philmd@redhat.com>, devel@edk2.groups.io
Cc: Philippe Mathieu-Daude <philmd@redhat.com>,
	Liming Gao <liming.gao@intel.com>,
	Yonghong Zhu <yonghong.zhu@intel.com>,
	Zhichao Gao <zhichao.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools/PatchCheck.py: Ignore CR and LF characters in subject length
Date: Thu, 02 Jan 2020 01:39:58 -0800	[thread overview]
Message-ID: <157795799839.2404955.6192927022904181653@jljusten-skl> (raw)
In-Reply-To: <20191219141256.25752-1-philmd@redhat.com>

On 2019-12-19 06:12:56, Philippe Mathieu-Daudé wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=113
> 
> Strip the trailing characters before checking the subject line is
> less than 72 characters.
> 
> Fixes: e61406708c83f
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
> ---
> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> ---
>  BaseTools/Scripts/PatchCheck.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index 2a4e6f603e79..b72e71963ea8 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -196,7 +196,7 @@ class CommitMessageCheck:
>              self.error('Empty commit message!')
>              return
>
> -        if count >= 1 and len(lines[0]) >= 72:
> +        if count >= 1 and len(lines[0].strip()) >= 72:

I think we should use rstrip rather than strip. I tried to test this
with rstrip instead, by updating the commit message to have several
whitespace characters at the beginning.

Unfortunately, I think subject_prefix_re is eating more spaces at the
start of the line than it ought to.

The leading whitespace issue is probably a problem for another day, so
if you change it to rstrip, then:

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

>              self.error('First line of commit message (subject line) ' +
>                         'is too long.')
>
> -- 
> 2.21.0
> 
> 
> 
> 

  parent reply	other threads:[~2020-01-02  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 14:12 [PATCH 1/1] BaseTools/PatchCheck.py: Ignore CR and LF characters in subject length Philippe Mathieu-Daudé
2019-12-31 13:23 ` Philippe Mathieu-Daudé
2020-01-02  9:39 ` Jordan Justen [this message]
2020-01-02 11:18   ` [edk2-devel] " Philippe Mathieu-Daudé

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=157795799839.2404955.6192927022904181653@jljusten-skl \
    --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