Merge branch 'sa/multi-mailmap-fix'

When asking to apply mailmap to both author and committer field
while showing a commit object, the field that appears later was not
correctly parsed and replaced, which has been corrected.

* sa/multi-mailmap-fix:
  cat-file: fix mailmap application for different author and committer
This commit is contained in:
Junio C Hamano
2025-06-24 09:48:51 -07:00
2 changed files with 37 additions and 0 deletions

View File

@@ -412,6 +412,10 @@ void apply_mailmap_to_header(struct strbuf *buf, const char **header,
found_header = 1;
buf_offset += endp - line;
buf_offset += rewrite_ident_line(person, endp - person, buf, mailmap);
/* Recompute endp after potential buffer reallocation */
endp = buf->buf + buf_offset;
if (*endp == '\n')
buf_offset++;
break;
}