Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
check return value from diff_setup_done()
author
Junio C Hamano
<junkio@cox.net>
Wed, 9 Aug 2006 19:45:27 +0000
(12:45 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 9 Aug 2006 19:45:27 +0000
(12:45 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-diff.c
patch
|
blob
|
history
revision.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
1d17c25
)
diff --git
a/builtin-diff.c
b/builtin-diff.c
index 1075855102fdb9d49f923edc4b62ddb75aa8027c..dd9886c6e81030bfd893089e5d2a34fe710f0ba7 100644
(file)
--- 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;
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
}
/* Do we have --cached and not have a pending object, then
diff --git
a/revision.c
b/revision.c
index a58257ad8037f7009c69ee0502c3669756bb3987..5a91d06b980d710e30a80c353a636ca1ca6b9a55 100644
(file)
--- a/
revision.c
+++ b/
revision.c
@@
-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.abbrev = revs->abbrev;
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
}
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;
}