summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-09-11 10:53:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-11 10:53:40 -0700
commit738c2187604756fea3901554a49f9137e02ed0ef (patch)
treeac786621832f1ac568761e96989ca984a836530e /builtin
parentMerge branch 'tr/merge-recursive-flush' into maint-1.7.11 (diff)
parentdiff_setup_done(): return void (diff)
downloadtgif-738c2187604756fea3901554a49f9137e02ed0ef.tar.xz
Merge branch 'tr/void-diff-setup-done' into maint-1.7.11
* tr/void-diff-setup-done: diff_setup_done(): return void
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c9
-rw-r--r--builtin/checkout.c3
-rw-r--r--builtin/diff.c3
-rw-r--r--builtin/merge.c3
4 files changed, 6 insertions, 12 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index a9705d06a5..cad4111a36 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -407,8 +407,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);
@@ -494,8 +493,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);
@@ -1075,8 +1073,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
diff --git a/builtin/checkout.c b/builtin/checkout.c
index e060efb2a2..45aa0a8701 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -315,8 +315,7 @@ static void show_local_changes(struct object *head, struct diff_options *opts)
init_revisions(&rev, NULL);
rev.diffopt.flags = opts->flags;
rev.diffopt.output_format |= DIFF_FORMAT_NAME_STATUS;
- if (diff_setup_done(&rev.diffopt) < 0)
- die(_("diff_setup_done failed"));
+ diff_setup_done(&rev.diffopt);
add_pending_object(&rev, head, NULL);
run_diff_index(&rev, 0);
}
diff --git a/builtin/diff.c b/builtin/diff.c
index bf72298752..9650be2c50 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -302,8 +302,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);
diff --git a/builtin/merge.c b/builtin/merge.c
index dd50a0c57b..e81fde6d79 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -404,8 +404,7 @@ static void finish(struct commit *head_commit,
opts.output_format |=
DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT;
opts.detect_rename = DIFF_DETECT_RENAME;
- if (diff_setup_done(&opts) < 0)
- die(_("diff_setup_done failed"));
+ diff_setup_done(&opts);
diff_tree_sha1(head, new_head, "", &opts);
diffcore_std(&opts);
diff_flush(&opts);