On Sat, Mar 20, 2021 at 10:54:38AM +0800, ZheNing Hu wrote: > I am looking for how to extract each author or committer from the log. > I just know I can use: > > $ git log --pretty="%an %ae" | sort | uniq > > get all unique author <email> from a git repo. > Is there any function in the source code of git to get them? If I understand Junio's suggestion correctly, it is very similar to how "commit --author" works. See how it calls find_author_by_nickname(), which finds the first commit matching the name, and then pulls out the full name from format_commit_message(). -Peff