summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-16 22:40:45 -0800
committerJunio C Hamano <gitster@pobox.com>2010-02-16 22:40:45 -0800
commit72cd63c008c673e185740a694cdf3e85711df3d2 (patch)
tree769aa7f5f340d15e71777eb6337bb711b2f5630e /diff.c
parent7e5eb8f1834722507e2d2171a253b78b1d924458 (diff)
parentd3f69766c431bab6321fed1ce64d914dc44ff87f (diff)
downloadgit-72cd63c008c673e185740a694cdf3e85711df3d2.tar.gz
Merge branch 'maint'
* maint: Prepare 1.7.0.1 release notes Fix use of mutex in threaded grep dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught Remove hyphen from "git-command" in two error messages
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index 381cc8d4fd..68def6caed 100644
--- a/diff.c
+++ b/diff.c
@@ -2893,6 +2893,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
;
else if (!prefixcmp(arg, "--output=")) {
options->file = fopen(arg + strlen("--output="), "w");
+ if (!options->file)
+ die_errno("Could not open '%s'", arg + strlen("--output="));
options->close_file = 1;
} else
return 0;