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

[PATCH] diff.c: truly honor size_only request for populate_filespec.

From
Junio C Hamano <junkio@cox.net>
Date
May 6, 2007, 08:49 UTC
Message-ID
<7vlkg2cp5h.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vr6pucp9e.fsf@assigned-by-dhcp.cox.net>

For some reason we did not honor size_only requests when "size cache" was in use. They should be independent.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * I think this is a right fix.  When used together with other
   patches, it seems to help reducing the memory footprint a
   bit, but by itself not that much and it seems to have
   slightly negative performance impact.
 diff.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/diff.c b/diff.c
index 7bbe759..02c9467 100644
--- a/diff.c
+++ b/diff.c
@@ -1503,9 +1503,6 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
 	if (S_ISDIR(s->mode))
 		return -1;
 
-	if (!use_size_cache)
-		size_only = 0;
-
 	if (s->data)
 		return err;
 
-- 
1.5.2.rc1.697.g5086
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 6 in “diff: release blobs after generating textual diff.”
  1. diff: release blobs after generating textual diff.Junio C Hamano, May 6, 2007
  2. diff.c: truly honor size_only request for populate_filespec.Junio C Hamano, May 6, 2007
  3. diff: use filespec as in-place size cacheJunio C Hamano, May 6, 2007
  4. Nicolas PitreMay 6, 2007
  5. Robin RosenbergMay 6, 2007
  6. Junio C HamanoMay 8, 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.