diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2017-05-03 17:16:55 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-26 12:33:56 +0900 |
commit | 5118d7f4e6e00b7eac3ce08a16392a732edc0b2b (patch) | |
tree | 57f4cb50b70b89d89e40d2fec38a542dc628d006 /rerere.c | |
parent | 382fb07f7bbb1f94fa3e1293d5df151725a886a3 (diff) | |
download | git-5118d7f4e6e00b7eac3ce08a16392a732edc0b2b.tar.gz |
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 'rerere.c')
-rw-r--r-- | rerere.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -484,13 +484,13 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output io.input = fopen(path, "r"); io.io.wrerror = 0; if (!io.input) - return error("Could not open %s", path); + return error_errno("Could not open %s", path); if (output) { io.io.output = fopen(output, "w"); if (!io.io.output) { fclose(io.input); - return error("Could not write %s", output); + return error_errno("Could not write %s", output); } } |