summaryrefslogtreecommitdiff
path: root/rerere.c
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 /rerere.c
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 'rerere.c')
-rw-r--r--rerere.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rerere.c b/rerere.c
index 971bfed..1351b0c 100644
--- a/rerere.c
+++ b/rerere.c
@@ -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);
}
}