From: Mark Wooding Date: Wed, 1 Feb 2006 11:44:35 +0000 (+0000) Subject: http-fetch: Fix message reporting rename of object file. X-Git-Tag: v1.2.0~57^3~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7b934ec015363dd8881d249838ab3623a2d345fd;p=git.git http-fetch: Fix message reporting rename of object file. move_temp_to_file returns 0 or -1. This is not a good thing to pass to strerror(3). Fortunately, someone already reported the error, so don't worry too much. Signed-off-by: Mark Wooding Signed-off-by: Junio C Hamano --- diff --git a/http-fetch.c b/http-fetch.c index 7b1b2a02..555e95d5 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -822,9 +822,8 @@ static int fetch_object(struct alt_base *repo, unsigned char *sha1) } else if (memcmp(obj_req->sha1, obj_req->real_sha1, 20)) { ret = error("File %s has bad hash\n", hex); } else if (obj_req->rename < 0) { - ret = error("unable to write sha1 filename %s: %s", - obj_req->filename, - strerror(obj_req->rename)); + ret = error("unable to write sha1 filename %s", + obj_req->filename); } release_object_request(obj_req);