]> granicus.if.org Git - git/commit
format-patch: allow additional generated content in make_cover_letter()
authorEric Sunshine <sunshine@sunshineco.com>
Sun, 22 Jul 2018 09:57:04 +0000 (05:57 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jul 2018 19:50:05 +0000 (12:50 -0700)
commitfa5b7ea670f4c5ee377e7fce799300829eabb291
treed44e4d6dd94bafc77012cbe5cff5b195378830ab
parentb7bd9486b055c3f967a870311e704e3bb0654e4f
format-patch: allow additional generated content in make_cover_letter()

make_cover_letter() returns early when it lacks sufficient state to emit
a diffstat, which makes it difficult to extend the function to reliably
emit additional generated content. Work around this shortcoming by
factoring diffstat-printing logic out to its own function and calling it
as needed without otherwise inhibiting normal control flow.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c