cat-file: fix mailmap not applied to committer when author and committer differ
This MR aims to fix the bug #553 (closed)
In certain cases, git cat-file --mailmap
failed to apply mailmap transformations to the committer identity when the author and committer were different. This resulted in the committer email not being mapped as expected, even though the author mapping worked correctly.
This bug was reported by @vyaklushin (see https://gitlab.com/vyaklushin/git-mailmap-bug for a reproduction). The issue was caused by buffer pointer invalidation in apply_mailmap_to_header()
in ident.c
when processing multiple identity lines sequentially.
Edited by Siddharth Asthana