aboutsummaryrefslogtreecommitdiff
path: root/object-file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-04-07 14:59:26 -0700
committerJunio C Hamano <gitster@pobox.com>2026-04-07 14:59:26 -0700
commit7b6d0cd51b30e842ffb95d045385100b7c677886 (patch)
treea12833ed2f687f197324fdc07ffa3112a2be7ae2 /object-file.c
parent59063fe8b415f150eecd38c63b0171a0e8449364 (diff)
parent6fea405bb92100a229c0ee83c98e062e271577cd (diff)
downloadgit-7b6d0cd51b30e842ffb95d045385100b7c677886.tar.xz
Merge branch 'ps/fsck-wo-the-repository'
Internals of "git fsck" have been refactored to not depend on the global `the_repository` variable. * ps/fsck-wo-the-repository: builtin/fsck: stop using `the_repository` in error reporting builtin/fsck: stop using `the_repository` when marking objects builtin/fsck: stop using `the_repository` when checking packed objects builtin/fsck: stop using `the_repository` with loose objects builtin/fsck: stop using `the_repository` when checking reflogs builtin/fsck: stop using `the_repository` when checking refs builtin/fsck: stop using `the_repository` when snapshotting refs builtin/fsck: fix trivial dependence on `the_repository` fsck: drop USE_THE_REPOSITORY fsck: store repository in fsck options fsck: initialize fsck options via a function fetch-pack: move fsck options into function scope
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/object-file.c b/object-file.c
index 4f77ce0982..9e57eb6c27 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1282,8 +1282,9 @@ static int index_mem(struct index_state *istate,
}
}
if (flags & INDEX_FORMAT_CHECK) {
- struct fsck_options opts = FSCK_OPTIONS_DEFAULT;
+ struct fsck_options opts;
+ fsck_options_init(&opts, the_repository, FSCK_OPTIONS_DEFAULT);
opts.strict = 1;
opts.error_func = hash_format_check_report;
if (fsck_buffer(null_oid(istate->repo->hash_algo), type, buf, size, &opts))