else
git format-patch "${args[@]}" "$from..$tip"
fi
+ # Assisted-by is no longer asked for upstream (1e035297ffda "docs:
+ # 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.
+ python3 -I - "$d"/[0-9][0-9][0-9][0-9]-*.patch <<'PY'
+import sys
+for f in sys.argv[1:]:
+ if f.endswith('/0000-cover-letter.patch'):
+ continue
+ lines = open(f).read().split('\n')
+ end = lines.index('---')
+ out = [l for i, l in enumerate(lines)
+ if i >= end or not l.lower().startswith('assisted-by:')]
+ if len(out) != len(lines):
+ open(f, 'w').write('\n'.join(out))
+PY
echo "$t $n $(git rev-parse --short=12 "$PFX$t")${LANEPARENT[$t]:+ on ${LANEPARENT[$t]}}"
done
done
[ "$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"
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"