Commit 838ba01
format-patch: simplify after-subject MIME header handling
In log_write_email_headers(), we append our MIME headers to the set of
extra headers by creating a new strbuf, adding the existing headers, and
then adding our new ones. We had to do it this way when our output
buffer might point to the constant opt->extra_headers variable.
But since the previous commit, we always make a local copy of that
variable. Let's turn that into a strbuf, which lets the MIME code simply
append to it. That simplifies the function and avoids a pointless extra
copy of the headers.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 305a681 commit 838ba01
1 file changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
483 | 486 | | |
484 | 487 | | |
485 | 488 | | |
| |||
496 | 499 | | |
497 | 500 | | |
498 | 501 | | |
499 | | - | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
504 | 506 | | |
505 | 507 | | |
506 | | - | |
507 | | - | |
| 508 | + | |
508 | 509 | | |
509 | 510 | | |
510 | 511 | | |
| |||
515 | 516 | | |
516 | 517 | | |
517 | 518 | | |
518 | | - | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
522 | | - | |
523 | 521 | | |
524 | 522 | | |
525 | 523 | | |
| |||
539 | 537 | | |
540 | 538 | | |
541 | 539 | | |
542 | | - | |
| 540 | + | |
543 | 541 | | |
544 | 542 | | |
545 | 543 | | |
| |||
0 commit comments