path: root/builtin/diff.c
diff options
authorThomas Rast <>2012-08-03 12:16:24 (GMT)
committerJunio C Hamano <>2012-08-03 19:11:07 (GMT)
commit28452655af988094792483a51d188c58137760cd (patch)
tree17021a34d32b9963d8612040a75b15b4e501399a /builtin/diff.c
parentd0f1ea6003d97e63110fa7d50bb07f546a909b6e (diff)
diff_setup_done(): return void
diff_setup_done() has historically returned an error code, but lost the last nonzero return in 943d5b7 (allow diff.renamelimit to be set regardless of -M/-C, 2006-08-09). The callers were in a pretty confused state: some actually checked for the return code, and some did not. Let it return void, and patch all callers to take this into account. This conveniently also gets rid of a handful of different(!) error messages that could never be triggered anyway. Note that the function can still die(). Signed-off-by: Thomas Rast <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/diff.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/diff.c b/builtin/diff.c
index 387afa7..a2c45db 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -294,8 +294,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
argc = setup_revisions(argc, argv, &rev, NULL);
if (!rev.diffopt.output_format) {
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
- if (diff_setup_done(&rev.diffopt) < 0)
- die(_("diff_setup_done failed"));
+ diff_setup_done(&rev.diffopt);
DIFF_OPT_SET(&rev.diffopt, RECURSIVE);