summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-05-03 17:16:55 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-26 12:33:56 +0900
commit5118d7f4e6e00b7eac3ce08a16392a732edc0b2b (patch)
tree57f4cb50b70b89d89e40d2fec38a542dc628d006 /builtin
parentwrapper.c: make warn_on_inaccessible() static (diff)
downloadtgif-5118d7f4e6e00b7eac3ce08a16392a732edc0b2b.tar.xz
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 b3b10cc1ed..26d6a3cf14 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;