aboutsummaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-09 12:45:27 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-09 12:45:27 -0700
commit72ee96c0f1861fcdb9eaf39e78d86888437a27a9 (patch)
tree4f670c1132c867b7887a070dc450e63ace2fd03e /builtin-diff.c
parent1d17c25c38a6b98d20b7bbe789b45996fd84d672 (diff)
downloadgit-72ee96c0f1861fcdb9eaf39e78d86888437a27a9.tar.gz
git-72ee96c0f1861fcdb9eaf39e78d86888437a27a9.tar.xz
check return value from diff_setup_done()
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 107585510..dd9886c6e 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -253,7 +253,8 @@ 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;
- diff_setup_done(&rev.diffopt);
+ if (diff_setup_done(&rev.diffopt) < 0)
+ die("diff_setup_done failed");
}
/* Do we have --cached and not have a pending object, then