From: Kees Cook <kees@kernel.org>
To: Sasha Levin <sashal@kernel.org>
Cc: workflows@vger.kernel.org, ksummit@lists.linux.dev,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Mark Brown <broonie@kernel.org>, Theodore Ts'o <tytso@mit.edu>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Leon Romanovsky <leon@kernel.org>,
Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Thorsten Leemhuis <linux@leemhuis.info>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v2 2/5] agents: add a skill to determine Fixes tags
Date: Mon, 12 Oct 2026 20:55:25 -0700 [thread overview]
Message-ID: <202610122052.0C2001A48E@keescook> (raw)
In-Reply-To: <20261012213452.1863248-3-sashal@kernel.org>
On Mon, Oct 12, 2026 at 05:34:49PM -0400, Sasha Levin wrote:
> +Resolve revisions against the repository being inspected. For example, with
> +``fix`` set to the supplied revision::
> +
> + git rev-parse --show-toplevel
> + git rev-parse --verify --end-of-options "$fix^{commit}"
> + git show --no-patch --format=fuller "$fix"
> + git rev-list --parents -n 1 "$fix"
> + git show --format= --find-renames "$fix"
> +
> +Use ``git diff --cached`` and ``git diff`` to inspect staged and unstaged work.
> +Read the surrounding code at the pre-fix base with ``git show <base>:<path>``.
> +Do not assume the current checkout contains the historical implementation.
I don't really like having "how to use git" in here. Especially not "how
to figure out what the staged diff is". That is way off topic.
> +Useful read-only searches include the following. Here ``base``, ``path``,
> +``old_path``, ``new_path``, and ``candidate`` refer to identified revisions or
> +paths; replace the example line range and expressions with relevant ones::
> +
> + git blame -M -C -L 100,140 "$base" -- "$path"
> + git log --follow -p "$base" -- "$path"
> + git log -p -S 'relevant expression' "$base" -- "$old_path" "$new_path"
> + git log -p -G 'relevant.*pattern' "$base" -- "$old_path" "$new_path"
> + git show --find-renames "$candidate" -- "$old_path" "$new_path"
> + git rev-list --parents -n 1 "$candidate"
For example, using -S and -G here can be *extremely* slow. I think it's
best to keep this skill as short as it can possibly be. Adding these
"off topic" diversions seems like a token-eating mistake to me.
The overall guidance about how/why and where a short-cut isn't workable
all read well, though.
-Kees
--
Kees Cook
next prev parent reply other threads:[~2026-10-13 3:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 21:34 [PATCH v2 0/5] agents: add skills for Fixes tags, stable tags, similar bugs, and commit messages Sasha Levin
2026-10-12 21:34 ` [PATCH v2 1/5] agents: add infrastructure for agent resources Sasha Levin
2026-10-12 21:34 ` [PATCH v2 2/5] agents: add a skill to determine Fixes tags Sasha Levin
2026-10-13 3:55 ` Kees Cook [this message]
2026-10-13 4:42 ` Michael S. Tsirkin
2026-10-12 21:34 ` [PATCH v2 3/5] agents: add a skill to determine stable tags Sasha Levin
2026-10-13 3:59 ` Kees Cook
2026-10-13 11:30 ` Sasha Levin
2026-10-12 21:34 ` [PATCH v2 4/5] agents: add a skill to find other instances of a fixed bug Sasha Levin
2026-10-13 4:02 ` Kees Cook
2026-10-13 11:14 ` Sasha Levin
2026-10-12 21:34 ` [PATCH v2 5/5] agents: add a skill to write commit messages Sasha Levin
2026-10-12 22:47 ` [PATCH v2 0/5] agents: add skills for Fixes tags, stable tags, similar bugs, and " Jonathan Corbet
2026-10-13 3:48 ` Kees Cook
2026-10-13 11:22 ` Sasha Levin
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=202610122052.0C2001A48E@keescook \
--to=kees@kernel.org \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=konstantin@linuxfoundation.org \
--cc=ksummit@lists.linux.dev \
--cc=laurent.pinchart@ideasonboard.com \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=mst@redhat.com \
--cc=rdunlap@infradead.org \
--cc=sashal@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tytso@mit.edu \
--cc=workflows@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.