diff options
Diffstat (limited to 'http-walker.c')
-rw-r--r-- | http-walker.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/http-walker.c b/http-walker.c index ee049cb13d..07c2b1af82 100644 --- a/http-walker.c +++ b/http-walker.c @@ -4,6 +4,7 @@ #include "http.h" #include "list.h" #include "transport.h" +#include "packfile.h" struct alt_base { char *base; @@ -543,8 +544,10 @@ static int fetch_object(struct walker *walker, unsigned char *sha1) } else if (hashcmp(obj_req->sha1, req->real_sha1)) { ret = error("File %s has bad hash", hex); } else if (req->rename < 0) { - ret = error("unable to write sha1 filename %s", - sha1_file_name(req->sha1)); + struct strbuf buf = STRBUF_INIT; + sha1_file_name(&buf, req->sha1); + ret = error("unable to write sha1 filename %s", buf.buf); + strbuf_release(&buf); } release_http_object_request(req); |