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

[PATCH 1/4] Cleanup prepare_packed_git_one to reuse install_packed_git.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 1, 2007, 20:52 UTC
Message-ID
<20070201205222.GA19009@spearce.org>

There is little point in having the linked list insertion code appearing in install_packed_git, and then again just 30 lines further down in the same file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 sha1_file.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index 498665e..a42f94a 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -790,8 +790,7 @@ static void prepare_packed_git_one(char *objdir, int local)
 		p = add_packed_git(path, len + namelen, local);
 		if (!p)
 			continue;
-		p->next = packed_git;
-		packed_git = p;
+		install_packed_git(p);
 	}
 	closedir(dir);
 }
-- 
1.5.0.rc3.1.ge4b0e
Message 1 of 1 in “Cleanup prepare_packed_git_one to reuse install_packed_git.”
  1. 1/4 Cleanup prepare_packed_git_one to reuse install_packed_git.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.