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`
This commit is contained in:
Junio C Hamano
2025-04-08 14:28:17 -07:00
87 changed files with 677 additions and 613 deletions

View File

@@ -179,7 +179,7 @@ static int cmd_for_each_ref__exclude(struct ref_store *refs, const char **argv)
static int cmd_resolve_ref(struct ref_store *refs, const char **argv)
{
struct object_id oid = *null_oid();
struct object_id oid = *null_oid(the_hash_algo);
const char *refname = notnull(*argv++, "refname");
int resolve_flags = arg_flags(*argv++, "resolve-flags", empty_flags);
int flags;

View File

@@ -21,7 +21,7 @@ int cmd__submodule_nested_repo_config(int argc, const char **argv)
setup_git_directory();
if (repo_submodule_init(&subrepo, the_repository, argv[1], null_oid())) {
if (repo_submodule_init(&subrepo, the_repository, argv[1], null_oid(the_hash_algo))) {
die_usage(argv, "Submodule not found.");
}

View File

@@ -6,7 +6,8 @@ test_description='adding and checking out large blobs'
. ./test-lib.sh
test_expect_success 'core.bigFileThreshold must be non-negative' '
test_must_fail git -c core.bigFileThreshold=-1 rev-parse >out 2>err &&
: >input &&
test_must_fail git -c core.bigFileThreshold=-1 hash-object input >out 2>err &&
grep "bad numeric config value" err &&
test_must_be_empty out
'