aboutsummaryrefslogtreecommitdiffstats
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-01 11:31:29 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-01 11:31:29 -0700
commit0c1253014ef276b67504bbd1e56e386049eefdbd (patch)
tree0eef35ae86011e53d94e93a8c95971c564a3f157 /http.c
parentMerge branch 'lm/add-p-context' into next (diff)
parentobject-file: get rid of `the_repository` in index-related functions (diff)
downloadgit-0c1253014ef276b67504bbd1e56e386049eefdbd.tar.gz
git-0c1253014ef276b67504bbd1e56e386049eefdbd.zip
Merge branch 'ps/object-file-wo-the-repository' into next
Reduce implicit assumption and dependence on the_repository in the object-file subsystem. * ps/object-file-wo-the-repository: object-file: get rid of `the_repository` in index-related functions object-file: get rid of `the_repository` in `force_object_loose()` object-file: get rid of `the_repository` in `read_loose_object()` object-file: get rid of `the_repository` in loose object iterators object-file: remove declaration for `for_each_file_in_obj_subdir()` object-file: inline `for_each_loose_file_in_objdir_buf()` object-file: get rid of `the_repository` when writing objects odb: introduce `odb_write_object()` loose: write loose objects map via their source object-file: get rid of `the_repository` in `finalize_object_file()` object-file: get rid of `the_repository` in `loose_object_info()` object-file: get rid of `the_repository` when freshening objects object-file: inline `check_and_freshen()` functions object-file: get rid of `the_repository` in `has_loose_object()` object-file: stop using `the_hash_algo` object-file: fix -Wsign-compare warnings
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.c b/http.c
index 33ae9429fd..98853d6483 100644
--- a/http.c
+++ b/http.c
@@ -2332,7 +2332,7 @@ int http_get_file(const char *url, const char *filename,
ret = http_request_reauth(url, result, HTTP_REQUEST_FILE, options);
fclose(result);
- if (ret == HTTP_OK && finalize_object_file(tmpfile.buf, filename))
+ if (ret == HTTP_OK && finalize_object_file(the_repository, tmpfile.buf, filename))
ret = HTTP_ERROR;
cleanup:
strbuf_release(&tmpfile);
@@ -2816,7 +2816,7 @@ int finish_http_object_request(struct http_object_request *freq)
return -1;
}
odb_loose_path(the_repository->objects->sources, &filename, &freq->oid);
- freq->rename = finalize_object_file(freq->tmpfile.buf, filename.buf);
+ freq->rename = finalize_object_file(the_repository, freq->tmpfile.buf, filename.buf);
strbuf_release(&filename);
return freq->rename;