Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3171214pxb; Sun, 29 Aug 2021 16:25:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTSz49h4z9AnntGREerTH9WDxDrM4VgW4dXm8HWMIRzmbbsIfHS4UaibKn9IDOFKqgPI32 X-Received: by 2002:a05:6e02:1107:: with SMTP id u7mr13465643ilk.39.1630279538721; Sun, 29 Aug 2021 16:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630279538; cv=none; d=google.com; s=arc-20160816; b=K49B798VFos3Vuk8a0zeVnZTTh7i3iJezunPN2vNZsiUWsUxTtGpRmkDVqmUyjyz0k K+t5cjJnazOz9PLT/mt7sMTrqI6A7I0YSsXEXgsffEoR2APxKzvEgs/xkWepKG1+vVQX XwstLX3q/Ba+sjqmP6a1aUGXxxBFuYNzdnZSqL5xincjitoQAT2qvfuXYllz5shVKuzn 67GQy2MUTmoBtck9pK/QJG/dKZtBEwZBRCcO1TS/m+q8wHxv+7JaYwHttfdF54RKw34O U/nPbssW+JpI4JYHJ4JnfghStUCYXaRA8P6jkVtEr4tmCDDGbtBrw+E1PcjK+hU+6HIM dLbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=2DtSTvJOOglI5huxNjXBZUxQQ+1yrflPwCKreUr+MBQ=; b=OyJ3XaQbLlR8ls3FqEsh36TqgItJGIlH+uhscR/infMV4Hs98zJDKTzruzT7QuFTaV 3h9CG3DnGY1Vl06pvKKW2engZXXF6j2CKLrhY4D/IoiPHTF4mZYHlWRdlw+ycwh33wH1 zvHP66Ky9c9PXo0wgDc6DuBH11cgQ3HBBdVNd7h29JF0Dct9d63WbTjOxAsHEt6VVhgl 6t8fxJj2KjJuQD/fl4XTR5PierDQVTotbb+mIPA99JQZpF5xRk7u7mf73OIlKMKwycwK PE2+zr3XlbSqCNlCeB5dvlsFM7vdWbMvKOpHictMXfI1zZT+oB9qgX8rV6iWdgDAxHc2 8EFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IuOWKMXD; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si12827068ilq.160.2021.08.29.16.25.26; Sun, 29 Aug 2021 16:25:38 -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=@nifty.com header.s=dec2015msa header.b=IuOWKMXD; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbhH2XYa (ORCPT + 99 others); Sun, 29 Aug 2021 19:24:30 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:25100 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbhH2XYa (ORCPT ); Sun, 29 Aug 2021 19:24:30 -0400 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 17TNNI7T002570; Mon, 30 Aug 2021 08:23:19 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 17TNNI7T002570 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1630279399; bh=2DtSTvJOOglI5huxNjXBZUxQQ+1yrflPwCKreUr+MBQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IuOWKMXDXERVu47ew/FL0427j/zqGLbfmr05iFF7utbvQhZEbpFefPEhYbpa497bV +hO0xe9D573iPMpSW/gDBl6OzubHiQGinxPRpiCfzmaPcNGB9L0IGZjp+du9qrW+nF HKGOWB+K4F4M4xgl7ZgjLAFhjAi1WgibsoPyqVehaXwqIU5aTcxwz2x6x/G9Rt8Mxd LVTyIbeLt60CRcXfvDqwRwUkOzF+CYQbN89FBmgL23YRBkN8GU2rS+PmyL1VqFz1Vy r6V5kiIL0K70ypbRIa24kSNdcAtDEa46tXzVr9xncE8rLD7hBahtMh0/2FlBSXB21g FieV1qdFJxoqw== X-Nifty-SrcIP: [209.85.210.174] Received: by mail-pf1-f174.google.com with SMTP id 18so10724113pfh.9; Sun, 29 Aug 2021 16:23:19 -0700 (PDT) X-Gm-Message-State: AOAM532zZs9ZGcLN8yK8kAEXc+3WsL0RP7xxtCMM1U5J/GpI8+Bk8AVD 9vHbMVDW3H/DfqX6T+8/vYwvZYBSvxl33ZnAQZA= X-Received: by 2002:a63:a58:: with SMTP id z24mr18994549pgk.175.1630279398215; Sun, 29 Aug 2021 16:23:18 -0700 (PDT) MIME-Version: 1.0 References: <20210822192205.43210-1-arielmarcovitch@gmail.com> <20210822192205.43210-4-arielmarcovitch@gmail.com> In-Reply-To: From: Masahiro Yamada Date: Mon, 30 Aug 2021 08:22:41 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] checkkconfigsymbols.py: Forbid passing 'HEAD' to --commit To: Ariel Marcovitch Cc: Ariel Marcovitch , Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , Valentin Rothberg Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 29, 2021 at 10:23 PM Ariel Marcovitch wrote: > > 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? OK, I dropped 3/3 from my tree. Please send v2. > >> + > >> args.find = False > >> > >> if args.ignore: > >> -- > >> 2.25.1 > >> > > > Thanks for your time :) > > Ariel Marcovitch > -- Best Regards Masahiro Yamada