diff: drop useless return values in git-diff helpers
commitc0049ca0d7d4afb2d71ac76eba45d693facfc1d3
authorJeff King <peff@peff.net>
Mon, 21 Aug 2023 20:19:44 +0000 (21 16:19 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Aug 2023 22:33:24 +0000 (21 15:33 -0700)
treea6909baa8c47d02fd7f263baddcba843ca53dbe4
parent25bd3acd048152dcf2de5f446d2bd21b5fb42b09
diff: drop useless return values in git-diff helpers

Since git-diff has many diff modes, it dispatches to many helpers to
perform each one. But every helper simply returns "0", as it exits
directly if there are serious errors (and options like --exit-code are
handled afterwards). So let's get rid of these useless return values,
which makes the code flow more clear.

There's very little chance that we'd later want to propagate errors
instead of dying immediately. These are all static-local helpers for the
git-diff program implementing its various modes. More "lib-ified" code
would directly call the underlying functions.

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