Received: by 10.213.65.68 with SMTP id h4csp3351600imn; Mon, 9 Apr 2018 19:46:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/KIEnaLQLQn7HnIPJxRbyMVGkSyI6mULjHwex21E75N9tlZ8/s3iQtGcfNMXffNCHTu2Wc X-Received: by 10.98.242.80 with SMTP id y16mr1184737pfl.200.1523328418234; Mon, 09 Apr 2018 19:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523328418; cv=none; d=google.com; s=arc-20160816; b=HYOolKzbwBG7zswrdERSWEkzLQXx6wWc6Hn28WZDdqxSWRirsGWM8QmiQ87k6FjpdC XjXy6YO4T0lcsPI8twkvFT/k8wUcIaiTRhChVimJXYpYGsgIvvRtQ2hSY17gWOb8VdEZ WWHBSJv78GHGSq3axGhaRfrTo3SteTz5y2Jo103fnYIc+EkWfWVlI44eI4tjxfbILHar Vj8lcOPMM9+H+DGh2iY7nm5Tg9VGt205/RqxEtHUQKV6lYVlN49DoJC1rnaM+psgjLwn 1DeG9MvYBeMRyR6YxMpEqHWUtPJFHrSTayPFL4pnFSaVAoC9lSnJ4zKesFmI3TlzBjBw 2Dgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature:arc-authentication-results; bh=MMeO5p9Y+S/oT4W8h2pwpR3NEV9KeOzsfTSdHkd7bKw=; b=hq+fTkv0h00qTmUVyVarkWVpZaqKIXfvVIP1L3UQwcaAU8EA/kmYYcq1ThbkFL83fz X1cYicrwC8i9VdYGji8R1XK51br/sTAwVwNIY/COLlWlv3HSWpbZqFlCAHLVC2Dww9Z3 N9GGi+Se6BvUTcP5cbtsGjZLhh9M8WQ8qpLilZZ5iMPq/gwNxw/b2EyVw9S0FvNRvuSM cXKmFBn+evWnKcajxuWK/qc/bNluU0RjKBh3Ld/zTw7Hf11dfTQN1gzk6a1ldO5qkcRh +j92mpBZZRv6lQgcNi99ntYWV9XYKLUf8MGQd/g22PAVgm7DnrgvR3S57Qnt4HkssGUF 3b1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s7YtvaIH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b59-v6si1585503plc.309.2018.04.09.19.46.21; Mon, 09 Apr 2018 19:46:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s7YtvaIH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752555AbeDJCnE (ORCPT + 99 others); Mon, 9 Apr 2018 22:43:04 -0400 Received: from mail-pl0-f44.google.com ([209.85.160.44]:33829 "EHLO mail-pl0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136AbeDJCnC (ORCPT ); Mon, 9 Apr 2018 22:43:02 -0400 Received: by mail-pl0-f44.google.com with SMTP id y12-v6so6334097plt.1 for ; Mon, 09 Apr 2018 19:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=MMeO5p9Y+S/oT4W8h2pwpR3NEV9KeOzsfTSdHkd7bKw=; b=s7YtvaIHsC+LHvZs7+nKO+omvu5jcwNycMFGxtquPhERtFRNvRgn/0loN0xltMwXz2 D+qGB8p1kO+kRXGdULK3bxwxmgvhZpbQt5KyRy294hEOWmjUePc2yOXVwPmRDoFvnMwW YDHTGIu7kBtZGQYYxyj1Rb1TlKgfYkNCJkPNE9BXMjj1qOyQAOg9vgnzIhxQ9Qb3op6n nRIkcDNnSVQjrKNvwcL1LEIPCY5AaT037ZD/BEvvTLi4nh79X4owbasWBShmw6gVloyb h+ZXJ0vObrs/45DVl2TB02O3667C+Ov/pkLJCx8RMReBLEdZBJVBYUoVMCgv0VMPDLNW Th2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=MMeO5p9Y+S/oT4W8h2pwpR3NEV9KeOzsfTSdHkd7bKw=; b=j3b2NL9IwEDg9kTTskRiJAwVL9RNcsF2KrwqOftTOyNA/Bs5A0/0AQSxR+184Uf5wv lzjyBLfVrqgUpRGM+/bCSVAnEbLI6R6Pos5bOZLbGKV0PPvxIoYMJAfE/mewyF15lTaj k2PgKgRoljx5gvsx8RE+LDy3EIK15CkACCZ5uBg47YkRtPNVwHMDWebhi9WPFFluWX21 u2TsLULILG+sjyI5hMqpUhIxKK1ASxjvCrG8FXHjxyXxJWmxun4Pk+9mXki6Zgr+nviJ T/Qoi+a4bilcTJ+gf2o72mvVh2wZJSmj9tmmXUCkeRV0S3O54iIxKL4Wh+hqCJA4voqe ApUA== X-Gm-Message-State: AElRT7GtvjvtJvit0SXGXXs6EWf0YIiOVc9oQlzJD4FB5kurBdoezAN8 4id0sSTwL2pQlhi/hVVN6No= X-Received: by 2002:a17:902:8ec8:: with SMTP id x8-v6mr42220137plo.179.1523328181963; Mon, 09 Apr 2018 19:43:01 -0700 (PDT) Received: from [0.0.0.0] (67.216.217.169.16clouds.com. [67.216.217.169]) by smtp.gmail.com with ESMTPSA id a81sm2808782pfc.168.2018.04.09.19.42.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 19:43:00 -0700 (PDT) Subject: Re: [PATCH] checkpatch: relax check for revert commit To: Joe Perches , Andy Whitcroft Cc: linux-kernel@vger.kernel.org, Jia He References: <1522679339-19067-1-git-send-email-hejianet@gmail.com> <1522679339-19067-2-git-send-email-hejianet@gmail.com> <7d9467ac5aee4b81b5c58c167ac553c75dd26f4c.camel@perches.com> <979a4ce5-2c68-6186-476c-1214aed2cdbc@gmail.com> From: Jia He Message-ID: <7c4a079b-9708-2b6e-5462-2c1c6bbf08d2@gmail.com> Date: Tue, 10 Apr 2018 10:42:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/9/2018 6:50 PM, Joe Perches Wrote: > On Mon, 2018-04-09 at 14:37 +0800, Jia He wrote: >> On 4/9/2018 1:07 AM, Joe Perches Wrote: >>> On Sun, 2018-04-08 at 10:12 +0800, Jia He wrote: >>>> Hi Andy & Joe >>>> >>>> Although it is minor, it is a real bug, I thought. >>>> >>>> Is there any comment? Thank you >>> If you really want to do something useful here, >>> quote the quote characters and compare for that. >>> >>> >> Hi Joe, thanks for the comments >> I am not sure I understand you comments here. > Change the tests to allow quote characters instead > of ignoring them. > > To do this matching, any internal quote character in > the actual commit string and the commit string from the > patch must be perl quoted with \Q\E so that the > expected title can be matched properly. Sorry,I didn't catch your point, even can't image how \Q \E is helpful. ;-) Maybe I haven't explained my changes clearly. e.g. commit f5c1350256fb ("Revert "XXX"") 2617                         } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i && 2618                                  defined $rawlines[$linenr] && 2619                                  $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { 2620                                 $orig_desc = $1; 2621                                 $hasparens = 1; line 2619, the match pattern ([^"]+)"\) will match NULL and let $orig_desc="" in this case. My change is to let $orig_desc to be Revert "XXX" Since the old code will check the commit id by git command to get the _real_ commit title. I can't understand why I should use \Q \E here, sorry if I am missing something. Cheers, Jia