combine-diff: factor out stat-format mask
authorJeff King <peff@peff.net>
Thu, 24 Jan 2019 12:33:51 +0000 (07:33 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Jan 2019 20:18:52 +0000 (12:18 -0800)
commit8817f0cc6751199a996342fbc28bd343d231a5ca
tree0815bbdc7a7edfa07093241663a02c37051ab8b5
parent48edf3a02addfa6385cd04c62a1c48671aad19aa
combine-diff: factor out stat-format mask

There are several conditionals in the combine diff code that check if
we're doing --stat or --numstat output. Since these must all remain in
sync, let's pull them out into a separate bit-mask.

Arguably this could go into diff.h along with the other DIFF_FORMAT
macros, but it's not clear that the definition of "which formats are
stat" is universal (e.g., does --dirstat count? --summary?). So let's
keep this local to combine-diff.c, where the meaning is more clearly
"stat formats that combine-diff supports".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
combine-diff.c