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 <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Mark Wooding committed
Feb 1, 2006 at 11:44 UTC
7b934ec015363dd8881d249838ab3623a2d345fd
1 file changed
+2
-3
http-fetch.c
+2
-3
@@ -822,9 +822,8 @@ static int fetch_object(struct alt_base *repo, unsigned char *sha1)
822
} else if (memcmp(obj_req->sha1, obj_req->real_sha1, 20)) {
823
ret = error("File %s has bad hash\n", hex);
824
} else if (obj_req->rename < 0) {
825
- ret = error("unable to write sha1 filename %s: %s",
826
- obj_req->filename,
827
- strerror(obj_req->rename));
825
+ ret = error("unable to write sha1 filename %s",
826
+ obj_req->filename);
827
}
828
829
release_object_request(obj_req);