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

[PATCH 2/4] Correct comment in prepare_packed_git_one.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 1, 2007, 20:52 UTC
Message-ID
<20070201205227.GB19009@spearce.org>
In-Reply-To
<a0b03fc086bb66e2aa2e386dcb4ff97fc837f07f.1170363130.git.spearce@spearce.org>

After staring at the comment and the associated for loop, I realized the comment was completely bogus. The section of code its talking about is trying to avoid duplicate mapping of the same packfile.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 sha1_file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index a42f94a..4aef244 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -779,7 +779,7 @@ static void prepare_packed_git_one(char *objdir, int local)
 		if (!has_extension(de->d_name, ".idx"))
 			continue;
 
-		/* we have .idx.  Is it a file we can map? */
+		/* Don't reopen a pack we already have. */
 		strcpy(path + len, de->d_name);
 		for (p = packed_git; p; p = p->next) {
 			if (!memcmp(path, p->pack_name, len + namelen - 4))
-- 
1.5.0.rc3.1.ge4b0e
Next: Junio C Hamano
Message 1 of 4 in “Correct comment in prepare_packed_git_one.”
  1. 2/4 Correct comment in prepare_packed_git_one.Shawn O. Pearce, Feb 1, 2007
  2. Junio C HamanoFeb 2, 2007
  3. 3/4 Refactor open_packed_git to return an error code.Shawn O. Pearce, Feb 1, 2007
  4. 4/4 Don't find objects in packs which aren't available anymore.Shawn O. Pearce, Feb 1, 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.