From 28452655af988094792483a51d188c58137760cd Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 3 Aug 2012 14:16:24 +0200 Subject: 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 --- notes-merge.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'notes-merge.c') diff --git a/notes-merge.c b/notes-merge.c index fb0832f97..66b1da9e8 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -126,8 +126,7 @@ static struct notes_merge_pair *diff_tree_remote(struct notes_merge_options *o, diff_setup(&opt); DIFF_OPT_SET(&opt, RECURSIVE); opt.output_format = DIFF_FORMAT_NO_OUTPUT; - if (diff_setup_done(&opt) < 0) - die("diff_setup_done failed"); + diff_setup_done(&opt); diff_tree_sha1(base, remote, "", &opt); diffcore_std(&opt); @@ -190,8 +189,7 @@ static void diff_tree_local(struct notes_merge_options *o, diff_setup(&opt); DIFF_OPT_SET(&opt, RECURSIVE); opt.output_format = DIFF_FORMAT_NO_OUTPUT; - if (diff_setup_done(&opt) < 0) - die("diff_setup_done failed"); + diff_setup_done(&opt); diff_tree_sha1(base, local, "", &opt); diffcore_std(&opt); -- cgit v1.2.1