Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
http-fetch: Fix message reporting rename of object file.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
distorted-mdw authored and Junio C Hamano committed Feb 6, 2006
1 parent 09db444 commit 7b934ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions http-fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7b934ec

Please sign in to comment.