Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2877003pxb; Sun, 29 Aug 2021 06:25:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRB+QE7qYoY3SZjmkyyJPOYDSYT+CmmgfsVcYr8+6zuXD0oi8nZoTBP1wA7m8Ymw4WM3JY X-Received: by 2002:a02:cd0c:: with SMTP id g12mr16208853jaq.130.1630243536552; Sun, 29 Aug 2021 06:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630243536; cv=none; d=google.com; s=arc-20160816; b=q1w/OY6VS+Rt8+d577GmIZ9TdwuLdraUslBOPxPMNsgLJrI+PbQYL3VJ8pQ4+6XeB2 umJhOaRWnMhw2sHwHOkBeq+uPrtSkTixCseDiPwPsiLHHx7DW9nqX7P5Qs+sVxhPuiVQ mQGhGF6PXZjA/dTm/hIBHHLO9LKiAFeEV/JWEeM33g08Bs5ww/XWBw6MdU6yeY8UscHS 4iGz7BPVA4rMXFC7+QHdklog6BKe3a6gSnQCp/KtSV8DxZMV97thsBeFpTulR4macih0 jcApnVWvvXqOPKtBUOu37dc/ykYlB2Itn3GGbFrLfU5er81H7EDuz5so/Gt5jIi1FhLF aLIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=R3pAucoQ7QlH4/SY6hcDE/PrvHPR7ZVMlnfCsrZbNiM=; b=X4AkvEAvW7ILwQlczSCj0fYtwkAPzG4Ki1kD/JbVaTZ7sdvOLAxefOZ9Z7q4lNBPd3 q98MgJ9DIwjy50XeBFLzRGaDgBQs4kdbL6yTIarpxEKXUTF+KMUU5wXLOYHIxf5XrweA 9ff5s/W/ROpyEWzXQjLdUCZSJAhsUYJnNYIgGyrqIb74e+nkhSTtKGEjdWhRuE3+KKRS QPQ4QaHQnjf9ymfjr7yTkxMu/wx4uzURFtsho9o/9TtnJZ108RjWr4NSwbAnhHS57l2+ zUHV7dLGOsAB8rlR+qmrzuYxhg1tiXUw5vfLrKYfL4whqF6c7BhiGq0TkZDGpMUtxvQJ yQ4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RK8xZvCG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h10si11726109ioe.21.2021.08.29.06.25.25; Sun, 29 Aug 2021 06:25:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RK8xZvCG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235735AbhH2NY2 (ORCPT + 99 others); Sun, 29 Aug 2021 09:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235759AbhH2NYZ (ORCPT ); Sun, 29 Aug 2021 09:24:25 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A969C061575; Sun, 29 Aug 2021 06:23:33 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id h13so18278705wrp.1; Sun, 29 Aug 2021 06:23:33 -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:content-language; bh=R3pAucoQ7QlH4/SY6hcDE/PrvHPR7ZVMlnfCsrZbNiM=; b=RK8xZvCGrvsBPf0RaCsD0lCgh6cjjEkGhhOHKjVTP8NVaL6pOiNYyp6nbHtg4hqoj7 mGc3A2Fo+0jG10QLW58twlQk4UGM4a9t0ENwBGGszCFKxU+pLOXgL/yOdB3xXWeQlLdd 1zURc1YthEJh/lMGgkz2Pc7o0SIKzujoH/rpQjnLAbqRgME/vKXSvsR2VH+wvtKHAGZo rnVskSvuYacnWAGoVYhYK9XKFIFDQUPzFdSxz0dy+G4q9FVoQ489ZmLGEJKJzzZUZ1U7 vJDZ35jPuYsyKRGlwUAgJPWBqxZa89cTxN6XRdtdpxyV5iQls9eIWcP3KdobXjBJu79H ZChw== 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 :content-language; bh=R3pAucoQ7QlH4/SY6hcDE/PrvHPR7ZVMlnfCsrZbNiM=; b=cFtnSp9qaLnfchIY31qoW8eFdU1/pR/Ipe7n3FrLS1p/6oEl6MI+swpulqwqP4dB9n 1U4HYDJtCSTIJDh9BF6FVKnj7RoTCAdnA/6mGfiyV3swk9lUBZMipsBBjUFX+ui5EUsB yuP1Q9ld1yjgT7p5R1CELMZv+wuvyTJ7qWD4eYTg0Q1EOu0M+w2SZeEIvwOZJttuGkHF 6VI3u2Rp9Ky42LEqEVRgXM+uj/Unm6wXZoV/iW2O2cC01hzS1adCK0zuKtG/MYDI1mTh 3Fgg+90anKCN1drL5VvIrTEE51fNdcpur1mwZ6YOgbsEecbA/XeTvTl8J3qcZfju8FtL lS3A== X-Gm-Message-State: AOAM532bFogXr4+5bzSG8TeAUJIO/lwMccpbGXASCQwkW5UDG8oa3Vn0 A2CAoMACwZiusnV2kQGE4sNCbodz/4Ujgg== X-Received: by 2002:adf:c10e:: with SMTP id r14mr3102358wre.313.1630243411780; Sun, 29 Aug 2021 06:23:31 -0700 (PDT) Received: from [192.168.1.107] ([147.235.73.50]) by smtp.gmail.com with ESMTPSA id u27sm12845779wru.2.2021.08.29.06.23.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Aug 2021 06:23:31 -0700 (PDT) Subject: Re: [PATCH 3/3] checkkconfigsymbols.py: Forbid passing 'HEAD' to --commit To: Masahiro Yamada , Ariel Marcovitch Cc: Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , Valentin Rothberg References: <20210822192205.43210-1-arielmarcovitch@gmail.com> <20210822192205.43210-4-arielmarcovitch@gmail.com> From: Ariel Marcovitch Message-ID: Date: Sun, 29 Aug 2021 16:23:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 24/08/2021 16:31, Masahiro Yamada wrote: > On Mon, Aug 23, 2021 at 4:23 AM Ariel Marcovitch > wrote: >> As opposed to the --diff option, --commit can get ref names instead of >> commit hashes. >> >> When using the --commit option, the script resets the working directory >> to the commit before the given ref, by adding '~' to the end of the ref. >> >> However, the 'HEAD' ref is relative, and so when the working directory >> is reset to 'HEAD~', 'HEAD' points to what was 'HEAD~'. Then when the >> script resets to 'HEAD' it actually stays in the same commit. In this >> case, the script won't report any cases because there is no diff between >> the cases of the two refs. >> >> Prevent the user from using HEAD refs. >> >> A better solution might be to resolve the refs before doing the >> reset, but for now just disallow such refs. > > Better than doing nothing. > So, applied to linux-kbuild. > > > > > >> Signed-off-by: Ariel Marcovitch >> --- >> scripts/checkkconfigsymbols.py | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py >> index 875e9a2c14b2..6259698e662d 100755 >> --- a/scripts/checkkconfigsymbols.py >> +++ b/scripts/checkkconfigsymbols.py >> @@ -103,6 +103,9 @@ def parse_options(): >> "continue.") >> >> if args.commit: >> + if args.commit.startswith('HEAD'): >> + sys.exit("The --commit option can't get use the HEAD ref") Just realized that the message says "can't get use" which doesn't make much sense :) Do you want me to send a new patch to fix it? >> + >> args.find = False >> >> if args.ignore: >> -- >> 2.25.1 >> > Thanks for your time :) Ariel Marcovitch