]> git.ipfire.org Git - thirdparty/git.git/blobdiff - http-walker.c
sha1_file: add repository argument to sha1_file_name
[thirdparty/git.git] / http-walker.c
index 1ae8363de2bb618df534cc85c86eba3eac9e9c0a..75d55d42a98503c8e74387b99476d31feeeff806 100644 (file)
@@ -1,10 +1,12 @@
 #include "cache.h"
+#include "repository.h"
 #include "commit.h"
 #include "walker.h"
 #include "http.h"
 #include "list.h"
 #include "transport.h"
 #include "packfile.h"
+#include "object-store.h"
 
 struct alt_base {
        char *base;
@@ -544,8 +546,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(the_repository, &buf, req->sha1);
+               ret = error("unable to write sha1 filename %s", buf.buf);
+               strbuf_release(&buf);
        }
 
        release_http_object_request(req);