summaryrefslogtreecommitdiff
path: root/builtin/blame.c
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2012-08-03 12:16:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-08-03 19:11:07 (GMT)
commit28452655af988094792483a51d188c58137760cd (patch)
tree17021a34d32b9963d8612040a75b15b4e501399a /builtin/blame.c
parentd0f1ea6003d97e63110fa7d50bb07f546a909b6e (diff)
downloadgit-28452655af988094792483a51d188c58137760cd.zip
git-28452655af988094792483a51d188c58137760cd.tar.gz
git-28452655af988094792483a51d188c58137760cd.tar.bz2
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 <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/blame.c')
-rw-r--r--builtin/blame.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 5a67c20..c0e26a0 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -392,8 +392,7 @@ static struct origin *find_origin(struct scoreboard *sb,
paths[1] = NULL;
diff_tree_setup_paths(paths, &diff_opts);
- if (diff_setup_done(&diff_opts) < 0)
- die("diff-setup");
+ diff_setup_done(&diff_opts);
if (is_null_sha1(origin->commit->object.sha1))
do_diff_cache(parent->tree->object.sha1, &diff_opts);
@@ -479,8 +478,7 @@ static struct origin *find_rename(struct scoreboard *sb,
diff_opts.single_follow = origin->path;
paths[0] = NULL;
diff_tree_setup_paths(paths, &diff_opts);
- if (diff_setup_done(&diff_opts) < 0)
- die("diff-setup");
+ diff_setup_done(&diff_opts);
if (is_null_sha1(origin->commit->object.sha1))
do_diff_cache(parent->tree->object.sha1, &diff_opts);
@@ -1065,8 +1063,7 @@ static int find_copy_in_parent(struct scoreboard *sb,
paths[0] = NULL;
diff_tree_setup_paths(paths, &diff_opts);
- if (diff_setup_done(&diff_opts) < 0)
- die("diff-setup");
+ diff_setup_done(&diff_opts);
/* Try "find copies harder" on new path if requested;
* we do not want to use diffcore_rename() actually to