On Tue, Aug 11, 2020 at 12:17 AM Emma Brooks <me@xxxxxxxxxxx> wrote: > On 2020-08-10 06:02:49-0400, Jeff King wrote: > > There was a little discussion in response to v1 on whether we could > > reuse the existing C mailmap code: > > I think it's probably not worth the effort to make the necessary changes > to "rev-list --header" Junio mentioned, just for gitweb. > > I agree it's a bit worrisome to have a second parser that could > potentially behave slightly differently than the main implementation. > What if we added tests for gitweb's mailmap parsing based on the same > cases used for Git itself? Another option which people probably won't like is to have gitweb start "git check-mailmap --stdin" in the background, leave it running, and just feed it author/commit info as needed and read back its replies. The benefit is that you get the .mailmap parsing and resolution built into Git itself without needing any extra parsing/resolution Perl code or tests. The downside is that people might balk at an extra process hanging around for the duration of gitweb itself. (You could also start up "git check-mailmap" repeatedly on-demand, but that would probably be too slow and resource intensive for real-world use.)