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

Re: Avoid wasting memory in git-rev-list

From
Junio C Hamano <junkio@cox.net>
Date
Sep 15, 2005, 22:02 UTC
Message-ID
<7v7jdiyop9.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0509151434470.26803@g5.osdl.org>

So using this I could also avoid wasting memory by the "are we already walking the commit reachable from our existing refs" check by doing something like this?

------------ git diff

diff --git a/fetch.c b/fetch.c
--- a/fetch.c
+++ b/fetch.c
@@ -207,6 +207,7 @@ int pull(char *target)
 	unsigned char sha1[20];
 	int fd = -1;
 
+	save_commit_buffer = 0;
 	if (write_ref && current_ref) {
 		fd = lock_ref_sha1(write_ref, current_ref);
 		if (fd < 0)
Previous: Linus TorvaldsNext: Linus Torvalds
Message 2 of 4 in “Avoid wasting memory in git-rev-list”
  1. Linus TorvaldsSep 15, 2005
  2. Junio C HamanoSep 15, 2005
  3. Linus TorvaldsSep 15, 2005
  4. Johannes SchindelinSep 15, 2005

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.