aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/fast-import.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-04-08 14:28:17 -0700
committerJunio C Hamano <gitster@pobox.com>2025-04-08 14:28:17 -0700
commit0dfca9888191bcea4fa00fb3c7abda787e06cf75 (patch)
treeb1aaec26bf06b5679e256e298ba389aaf0ca1b00 /builtin/fast-import.c
parentThe third batch (diff)
parenthash: stop depending on `the_repository` in `null_oid()` (diff)
downloadgit-0dfca9888191bcea4fa00fb3c7abda787e06cf75.tar.gz
git-0dfca9888191bcea4fa00fb3c7abda787e06cf75.zip
Merge branch 'ps/object-wo-the-repository' into ps/object-file-cleanup
* ps/object-wo-the-repository: hash: stop depending on `the_repository` in `null_oid()` hash: fix "-Wsign-compare" warnings object-file: split out logic regarding hash algorithms delta-islands: stop depending on `the_repository` object-file-convert: stop depending on `the_repository` pack-bitmap-write: stop depending on `the_repository` pack-revindex: stop depending on `the_repository` pack-check: stop depending on `the_repository` environment: move access to "core.bigFileThreshold" into repo settings pack-write: stop depending on `the_repository` and `the_hash_algo` object: stop depending on `the_repository` csum-file: stop depending on `the_repository`
Diffstat (limited to 'builtin/fast-import.c')
-rw-r--r--builtin/fast-import.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
index e432e8d5a1..63880b595c 100644
--- a/builtin/fast-import.c
+++ b/builtin/fast-import.c
@@ -770,7 +770,7 @@ static void start_packfile(void)
p->pack_fd = pack_fd;
p->do_not_close = 1;
p->repo = the_repository;
- pack_file = hashfd(pack_fd, p->pack_name);
+ pack_file = hashfd(the_repository->hash_algo, pack_fd, p->pack_name);
pack_data = p;
pack_size = write_pack_header(pack_file, 0);
@@ -798,7 +798,7 @@ static const char *create_index(void)
if (c != last)
die("internal consistency error creating the index");
- tmpfile = write_idx_file(the_hash_algo, NULL, idx, object_count,
+ tmpfile = write_idx_file(the_repository, NULL, idx, object_count,
&pack_idx_opts, pack_data->hash);
free(idx);
return tmpfile;
@@ -2021,7 +2021,7 @@ static void parse_and_store_blob(
static struct strbuf buf = STRBUF_INIT;
uintmax_t len;
- if (parse_data(&buf, big_file_threshold, &len))
+ if (parse_data(&buf, repo_settings_get_big_file_threshold(the_repository), &len))
store_object(OBJ_BLOB, &buf, last, oidout, mark);
else {
if (last) {
@@ -3425,7 +3425,7 @@ static int parse_one_option(const char *option)
unsigned long v;
if (!git_parse_ulong(option, &v))
return 0;
- big_file_threshold = v;
+ repo_settings_set_big_file_threshold(the_repository, v);
} else if (skip_prefix(option, "depth=", &option)) {
option_depth(option);
} else if (skip_prefix(option, "active-branches=", &option)) {