From 292533e3fd291b543333e3d13d50f3400158ea73 Mon Sep 17 00:00:00 2001 From: sylph-decoder Date: Mon, 31 Aug 2026 00:40:55 +0000 Subject: [PATCH] method: backticks in a double-quoted commit message are command substitution Second instance across two agents, and mine landed in the message describing the defect class itself. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v --- docs/re/METHOD.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/re/METHOD.md b/docs/re/METHOD.md index b32cfc65..f87207a8 100644 --- a/docs/re/METHOD.md +++ b/docs/re/METHOD.md @@ -2729,3 +2729,23 @@ quiet one.** A wrong answer gets noticed. A check that can only ever say "fine" reported as passing forever, and its output *looks* like evidence. ⚠️ Printing a verdict is not asserting it — the exit code is the assertion, and it is the part nobody reads until it matters. + +## Backticks in a double-quoted commit message are command substitution + +`sylpheed-port` reported three backticked words eaten out of one of their commit +messages, and named the property that makes it dangerous: **a dropped noun leaves +grammar intact**, so the sentence still parses and nothing looks wrong. + +🔴 **It then happened to me, in the commit message describing that class of +defect.** `git commit -m "... a \`return 0\` swallowed the band verdict ..."` +executed the backticked text and spliced in the empty result. The body now reads +*"a swallowed the verdict"* — three words gone, still grammatical. + +⚠️ The message was already pushed, and rewriting shared history is forbidden, so +it is corrected by a following empty commit rather than an amend. **A wrong commit +message cannot be fixed in place** — which makes this cheaper to prevent than any +of the other traps on this page. + +📌 Use a heredoc (`git commit -F -`) or single quotes for any message containing +backticks. This page is full of identifiers in backticks, so the exposure is +constant.