git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] fsck: fix broken loose object check.

From
Junio C Hamano <junkio@cox.net>
Date
Mar 5, 2007, 08:21 UTC
Message-ID
<7v3b4k2j97.fsf@assigned-by-dhcp.cox.net>

When "git fsck" without --full found a loose object missing because it was broken, it mistakenly thought it was not parsed because we found it in one of the packs. Back when this code was written, we did not have a way to explicitly check if we have the object in pack, but we do now.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 builtin-fsck.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-fsck.c b/builtin-fsck.c
index 6abf498..abdd0f2 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -67,7 +67,7 @@ static void check_reachable_object(struct object *obj)
 	 * do a full fsck
 	 */
 	if (!obj->parsed) {
-		if (has_sha1_file(obj->sha1))
+		if (has_sha1_pack(obj->sha1, NULL))
 			return; /* it is in pack - forget about it */
 		printf("missing %s %s\n", typename(obj->type), sha1_to_hex(obj->sha1));
 		return;
-- 
1.5.0.3.855.ga3b2
Message 1 of 1 in “fsck: fix broken loose object check.”
  1. 1/3 fsck: fix broken loose object check.Junio C Hamano, Mar 5, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.