From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.11648.1575562369134883463 for ; Thu, 05 Dec 2019 08:12:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bAsLxcSt; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575562368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V3x+YULnISFII2hBkH1P2WhbKJ8OpxpiPbq3ziWu0iw=; b=bAsLxcStWpXh2ogZ4ZXGBwHdUebWI+qPrJGUZ8p2CEsj9V+2lhH+SN2cLF47Ei9mXvmjci cC1SsgVT/+XrZo6boNM3K0KUqCNH8EBxG2xgsGqhPHZAHuzHu8xxMdj3LW6eSmFfBYwagD dpwPy//FS7hMQEq5FbaoIt46j2FaeOE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-340-XoY1sQVzM5On1ceexTJoJA-1; Thu, 05 Dec 2019 11:12:44 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 62B8F801FA0; Thu, 5 Dec 2019 16:12:43 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-76.brq.redhat.com [10.40.205.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6145A10016E8; Thu, 5 Dec 2019 16:12:41 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Philippe Mathieu-Daude , Bob Feng , Liming Gao , Laszlo Ersek , Ard Biesheuvel , Leif Lindholm Subject: [PATCH 1/6] BaseTools/PatchCheck: Stop parsing commit message after --- separator Date: Thu, 5 Dec 2019 17:12:29 +0100 Message-Id: <20191205161234.25071-2-philmd@redhat.com> In-Reply-To: <20191205161234.25071-1-philmd@redhat.com> References: <20191205161234.25071-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: XoY1sQVzM5On1ceexTJoJA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable git-format-patch uses the '---' separator to mark the end of the commit message. Anything after the separator is stripped by git-am, it is pointless to check this part. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Philippe Mathieu-Daude --- Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Leif Lindholm --- BaseTools/Scripts/PatchCheck.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 2a4e6f603e79..8bcf857a7d15 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -209,6 +209,10 @@ class CommitMessageCheck: 'empty.') =20 for i in range(2, count): + if lines[i].strip() =3D=3D '---': + # '---' marks the end of the commit message. + count =3D i + break if (len(lines[i]) >=3D 76 and len(lines[i].split()) > 1 and not lines[i].startswith('git-svn-id:')): --=20 2.21.0