Junio Hamano's patch describes the bug. mailinfo() calls read_one_header_line() in a loop until it returns 0, assuming a blank or non-header line was just read into 'line'. It then passes 'line' to handle_body() unconditionally.
On a header-only input, the lookahead fgetc() used for header folding hits EOF on the last header. In the next iteration, strbuf_getline_lf() sees feof() and returns EOF early without resetting 'line', and read_one_header_line() returns 0. mailinfo() then feeds the stale last header to handle_body(), leaking headers like Content-Type into the commit log.
The fix makes read_one_header_line() return -1 on EOF and calls handle_body() only when it returns 0. The commit message adds that checking feof() in mailinfo() would be wrong, but the excerpt cuts off before the reason.
The patch was posted twice and the excerpts show no review replies.