Let me steal the idea of no incessant lookups from https://stackoverflow.com/a/79658213/7976758 by @jthill:
#! /bin/sh
git rev-list --no-commit-header --format="%H %ae" HEAD |
while read commit_ID _email; do
if [ -z "$first_email" ]; then
first_email=$_email
fi
if [ "$first_email" = "$_email" ]; then
echo $commit_ID
else
exit
fi
done