# 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:]:
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):
[ "$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"