]> git.hungrycats.org Git - linux/commitdiff
scripts/export.sh: strip Assisted-by only from Zygo's patches
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 6 Nov 2026 01:52:12 +0000 (20:52 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 6 Nov 2026 01:52:12 +0000 (20:52 -0500)
Zygo: removing every author's Assisted-by is too much.  Strip the tag
only from exported patches whose From: is Zygo Blaxell
<ce3g8jdj@umail.furryterror.org>; other authors' patches keep their
tags.  The verify step checks only Zygo's patches, and skips cover
letters as the stripping does.

Dry run against misc-next/testing 2365f2f67131: verified; 11 tags left,
all in other authors' patches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/export.sh

index 473d93aee37b7ec7a04852edfb3fac1bdb6a2257..a98add91219a78848e5827aef4ba43741056144c 100755 (executable)
@@ -237,7 +237,8 @@ PY
        # remove Assisted-by references"; tool use goes in the cover letter).
        # The lane commits keep it, so Zygo can see which model wrote or
        # edited a patch; only the mail copies lose it, in the changelog part
-       # (headers to the first "---") of every patch, whoever added it.
+       # (headers to the first "---") of the patches Zygo authored.  Other
+       # authors' patches keep their own tags.
        python3 -I - "$d"/[0-9][0-9][0-9][0-9]-*.patch <<'PY'
 import sys
 for f in sys.argv[1:]:
@@ -245,6 +246,9 @@ for f in sys.argv[1:]:
         continue
     lines = open(f).read().split('\n')
     end = lines.index('---')
+    if not any(l.startswith('From: ') and '<ce3g8jdj@umail.furryterror.org>' in l
+               for l in lines[:lines.index('')]):
+        continue
     out = [l for i, l in enumerate(lines)
            if i >= end or not l.lower().startswith('assisted-by:')]
     if len(out) != len(lines):
@@ -285,8 +289,10 @@ for t in "${exported[@]}"; do
        [ "$got" = "$(git rev-parse "$want^{tree}")" ] || die "verify: $t patches != lane topic minus the dropped commits"
 done
 left=$(for t in "${exported[@]}"; do for f in "$OUT"/topics/$t/[0-9]*.patch; do
-       [ -e "$f" ] && sed -n '/^---$/q;/^[Aa]ssisted-by:/{s|^|'"$f"': |;p}' "$f"; done; done)
-[ -z "$left" ] || die "verify: Assisted-by left in the changelogs: $left"
+       [ -e "$f" ] && [ "${f##*/}" != 0000-cover-letter.patch ] || continue
+       sed -n '/^$/q;p' "$f" | grep -q '^From: .*<ce3g8jdj@umail\.furryterror\.org>' || continue
+       sed -n '/^---$/q;/^[Aa]ssisted-by:/{s|^|'"$f"': |;p}' "$f"; done; done)
+[ -z "$left" ] || die "verify: Assisted-by left in Zygo's changelogs: $left"
 GIT_INDEX_FILE=$idx git read-tree "$acc"
 if [ -s "$OUT/fixups/post-merge.patch" ]; then
        GIT_INDEX_FILE=$idx git apply --cached "$OUT/fixups/post-merge.patch"