fix: publish keeps a closing trailer block of --message last, so git reads Co-Authored-By again (#149)
CI / verify (push) Successful in 5m17s
CI / pwsh (push) Successful in 2m4s
Release / release (push) Successful in 36s

Files changed:
- CHANGES.md
- VERSION
- tools/CONTRACT.md
- tools/chemenu/commands/git_publish.py
- tools/chemenu/tests/test_git_publish.py

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
torbenandClaude Opus 5.5 committed 2026-10-02 16:39:08 +02:00
1 parent c65d559690
commit 80488bee38
5 files changed
+168 -8

No files matched your search

+21 -1
View File
@@ -59,7 +59,7 @@ concern - readable here, never shipped as something to parse.
---
## 8.0.0-beta.22 - 2026-10-02 - tools/bugreport: Starter für den Bugreport-Sammler, überspringt die Store-Aliase (#166)
## 8.0.0-beta.23 - 2026-10-02 - publish keeps a closing trailer block of --message last, so git reads Co-Authored-By again (#149)
**Author:** Torben Nehmer
@@ -97,6 +97,7 @@ concern - readable here, never shipped as something to parse.
- Windows-Portabilität: Pfadtrenner, Zeilenenden, Encoding und Locks
- INSTALL.md an die Installationsinstruktionen gekoppelt: Voraussetzungen generiert, Setup-Fragen geprüft
- tools/bugreport: Starter für den Bugreport-Sammler, überspringt die Store-Aliase (#166)
- publish keeps a closing trailer block of --message last, so git reads Co-Authored-By again (#149)
**Low impact**
- version bump no longer points at version release in its output
@@ -134,6 +135,25 @@ concern - readable here, never shipped as something to parse.
- preflight.ps1: the asset-mode error helper is Exit-Asset, so PSScriptAnalyzer passes
<!-- /wikitool:bumps -->
### `publish` keeps a closing trailer block of `--message` last (#149)
`publish` appended its `Files changed:` list to the end of `--message`. git reads trailers only
from a message's last paragraph, so a message ending in `Co-Authored-By:`/`Claude-Session:`
lines ended up with the file list as its last paragraph, and `git log --format=%(trailers)`,
`git interpret-trailers --parse` and the co-author display on Gitea and GitHub read nothing.
That held for every attributed commit `publish` made.
The list now goes in front of a closing trailer block. Whether `--message` ends in one is
decided by `git interpret-trailers --parse --no-divider`, not by a pattern of our own, so
continuation lines, `(cherry picked from ...)`, the title rule and the share of trailer lines a
block needs are judged the way git judges them. `--no-divider` matches how `git log` reads a
commit: past a `---` line. The list moves only when git reads exactly the same trailers from the
result as from `--message`. A message without a trailer block is committed byte-identically to
before. Neither gate token covers `--message`, so a `--confirm` or `--confirm-rebase` token
clears exactly what it cleared before.
Commits already on `main` keep their unreadable trailers: rewriting them would need a force-push.
### `tools/bugreport`: the collector finds its own Python (#166)
The bug-report collector is the one part of the stack that has to run when nothing else does,