From: Ariel Marcovitch <trhtkmarco@gmail.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
Ariel Marcovitch <arielmarcovitch@gmail.com>
Cc: Michal Marek <michal.lkml@markovi.net>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Valentin Rothberg <valentinrothberg@gmail.com>
Subject: Re: [PATCH 3/3] checkkconfigsymbols.py: Forbid passing 'HEAD' to --commit
Date: Sun, 29 Aug 2021 16:23:29 +0300 [thread overview]
Message-ID: <b7f9e9a8-6854-ef3b-a20c-3b4b3d2d8440@gmail.com> (raw)
In-Reply-To: <CAK7LNARmSmTTPRWcgcPF8kRntSFuaPkLD0A=xuz=CAp4SzxV=Q@mail.gmail.com>
Hello!
On 24/08/2021 16:31, Masahiro Yamada wrote:
> On Mon, Aug 23, 2021 at 4:23 AM Ariel Marcovitch
> <arielmarcovitch@gmail.com> 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 <arielmarcovitch@gmail.com>
>> ---
>> 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
next prev parent reply other threads:[~2021-08-29 13:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-22 19:22 [PATCH 0/3] checkkconfigsymbols.py: Fix various bugs Ariel Marcovitch
2021-08-22 19:22 ` [PATCH 1/3] checkkconfigsymbols.py: Fix the '--ignore' option Ariel Marcovitch
2021-08-24 13:25 ` Masahiro Yamada
2021-08-22 19:22 ` [PATCH 2/3] checkkconfigsymbols.py: Fix Kconfig parsing to find 'if' lines Ariel Marcovitch
2021-08-24 13:30 ` Masahiro Yamada
2021-08-29 13:17 ` Ariel Marcovitch
2021-08-29 23:41 ` Masahiro Yamada
2021-09-01 15:17 ` Ariel Marcovitch
2021-08-22 19:22 ` [PATCH 3/3] checkkconfigsymbols.py: Forbid passing 'HEAD' to --commit Ariel Marcovitch
2021-08-24 13:31 ` Masahiro Yamada
2021-08-29 13:23 ` Ariel Marcovitch [this message]
2021-08-29 23:22 ` Masahiro Yamada
2021-08-24 13:23 ` [PATCH 0/3] checkkconfigsymbols.py: Fix various bugs Masahiro Yamada
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-all 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=b7f9e9a8-6854-ef3b-a20c-3b4b3d2d8440@gmail.com \
--to=trhtkmarco@gmail.com \
--cc=arielmarcovitch@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=valentinrothberg@gmail.com \
/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
all inboxes | Powered by JetHome®