Re: [PATCH v10 2/3] interpret-trailers: add own-identity option
- From
Jeff King <peff@peff.net>
- Date
- Mar 20, 2021, 05:06 UTC
- Message-ID
- <YFWCvePMGvBY/I9v@coredump.intra.peff.net>
- In-Reply-To
- <CAOLTT8TQdT1PkdfuOk92U89Lgk9o_YhdeMyHb6SrE7GW+6PQJQ@mail.gmail.com>
On Sat, Mar 20, 2021 at 10:54:38AM +0800, ZheNing Hu wrote:
Show 7 quoted lines
> 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