Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:08
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---

 * 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help