From: Jeff King Date: Fri, 2 Nov 2018 06:36:06 +0000 (-0400) Subject: diff: avoid generating unused hunk header lines X-Git-Tag: v2.20.0-rc0~33^2~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3b40a090fd4e441e88897dfa96f50039952ed45b?ds=inline;hp=3b40a090fd4e441e88897dfa96f50039952ed45b diff: avoid generating unused hunk header lines Some callers of xdi_diff_outf() do not look at the generated hunk header lines at all. By plugging in a no-op hunk callback, this tells xdiff not to even bother formatting them. This patch introduces a stock no-op callback and uses it with a few callers whose line callbacks explicitly ignore hunk headers (because they look only for +/- lines). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---