Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] gitignore: ignore ltp-agent setup files
Date: Mon,  1 Jun 2026 09:37:36 +0000	[thread overview]
Message-ID: <20260601093736.3880-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260601-gitignore_ltp_agent-v2-1-fe5ab986ebd8@suse.com>

Hi Andrea,

Thank you for the patch. Please find review comments below.

---

**Patch**: gitignore: ignore ltp-agent setup files
**Verdict**: Needs revision ✗

---

## Commit Message

The commit message is mostly well written. However, there is a
precision issue with the body:

> Directory entries are anchored to the repository root (leading '/') so
> they only match the ltp-agent-injected paths and cannot accidentally
> shadow any unrelated subdirectory with the same name in the future.

This is technically true for the three directory entries (/agents/,
/linter/, /skills/), but the same rationale applies equally to the
four file/hidden-directory entries (AGENTS.md, GEMINI.md, .agents,
.claude) which are NOT anchored. The justification for anchoring —
preventing accidental shadowing — applies to all seven entries, not
only the directory ones.

## Code Review

**File**: .gitignore

### Issue 1: Non-directory entries should also be anchored [Needs revision]

The three directory symlinks are correctly anchored:

    /agents/
    /linter/
    /skills/

But the remaining four entries are not:

    AGENTS.md
    GEMINI.md
    .agents
    .claude

In git's pattern language, a pattern without a leading `/` is matched
recursively throughout the entire working tree. So `AGENTS.md` would
silently ignore any file named AGENTS.md anywhere inside the
repository — including inside testcases/ or any other subdirectory a
future contributor might create.  Since all four of these are
exclusively injected at the repository root by ltp-agent, they should
be anchored with a leading `/` for the same reason the directory
entries are, and for consistency with them.

**Suggested fix** — replace the four non-anchored entries:

    -AGENTS.md
    -GEMINI.md
    -.agents
    -.claude
    +/AGENTS.md
    +/GEMINI.md
    +/.agents
    +/.claude

With this change the commit-message body can also be updated to say
"All entries are anchored to the repository root …" for accuracy.

---

LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-06-01  9:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01  6:42 [LTP] [PATCH v2] gitignore: ignore ltp-agent setup files Andrea Cervesato
2026-06-01  9:37 ` linuxtestproject.agent [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-06-01  6:46 [LTP] [PATCH v3] " Andrea Cervesato
2026-06-01  9:39 ` [LTP] " linuxtestproject.agent
2026-05-30  7:32 [LTP] [PATCH] " Andrea Cervesato
2026-05-30  9:22 ` [LTP] " linuxtestproject.agent

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=20260601093736.3880-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=andrea.cervesato@suse.de \
    --cc=ltp@lists.linux.it \
    /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