check return value from diff_setup_done()
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
1d17c25c38
commit
72ee96c0f1
@ -253,7 +253,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
|
|||||||
argc = setup_revisions(argc, argv, &rev, NULL);
|
argc = setup_revisions(argc, argv, &rev, NULL);
|
||||||
if (!rev.diffopt.output_format) {
|
if (!rev.diffopt.output_format) {
|
||||||
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
|
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
|
/* Do we have --cached and not have a pending object, then
|
||||||
|
@ -936,7 +936,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
|
|||||||
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
|
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||||
}
|
}
|
||||||
revs->diffopt.abbrev = revs->abbrev;
|
revs->diffopt.abbrev = revs->abbrev;
|
||||||
diff_setup_done(&revs->diffopt);
|
if (diff_setup_done(&revs->diffopt) < 0)
|
||||||
|
die("diff_setup_done failed");
|
||||||
|
|
||||||
return left;
|
return left;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user