Thread (36 messages) flat view 36 messages, 2 authors, 3d ago

Re: [PATCH 05/10] odb: provide infrastructure for pluggable fsck checks

From: Patrick Steinhardt <hidden>
Date: 2026-08-31 06:00:44

On Thu, Aug 27, 2026 at 06:49:38AM -0400, Karthik Nayak wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 3f6056535f..adbe192e56 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -977,7 +979,8 @@ int cmd_fsck(int argc,
 		OPT_BOOL(0, "root", &show_root, N_("report root nodes")),
 		OPT_BOOL(0, "cache", &keep_cache_objects, N_("make index objects head nodes")),
 		OPT_BOOL(0, "reflogs", &include_reflogs, N_("make reflogs head nodes (default)")),
-		OPT_BOOL(0, "full", &check_full, N_("also consider packs and alternate objects")),
Question: OPT_BOOL sets 'check_full' to 0 when using '--no-full', does
OPT_BIT provide similar functionality?
Yes, it does.
quoted
@@ -1047,10 +1050,13 @@ int cmd_fsck(int argc,
 				    mark_object_for_connectivity, repo, 0);
 	} else {
 		for (source = repo->objects->sources; source; source = source->next)
-			if (check_full || source->local)
+			if ((odb_fsck_opts.flags & ODB_FSCK_FULL) || source->local)
 				fsck_source(repo, source);

-		if (check_full) {
+		if (odb_fsck(repo->objects, &odb_fsck_opts) < 0)
+			errors_found |= ERROR_OBJECT;
+
So most of the functionality will move into this and we'll cleanup
around in the following commits.
Yup, exactly.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help