summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-05-03 10:16:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-26 03:33:56 (GMT)
commit5118d7f4e6e00b7eac3ce08a16392a732edc0b2b (patch)
tree57f4cb50b70b89d89e40d2fec38a542dc628d006 /builtin
parent382fb07f7bbb1f94fa3e1293d5df151725a886a3 (diff)
downloadgit-5118d7f4e6e00b7eac3ce08a16392a732edc0b2b.zip
git-5118d7f4e6e00b7eac3ce08a16392a732edc0b2b.tar.gz
git-5118d7f4e6e00b7eac3ce08a16392a732edc0b2b.tar.bz2
print errno when reporting a system call error
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c
index b3b10cc..26d6a3c 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -858,7 +858,8 @@ static int open_next_file(struct commit *commit, const char *subject,
printf("%s\n", filename.buf + outdir_offset);
if ((rev->diffopt.file = fopen(filename.buf, "w")) == NULL)
- return error(_("Cannot open patch file %s"), filename.buf);
+ return error_errno(_("Cannot open patch file %s"),
+ filename.buf);
strbuf_release(&filename);
return 0;