[PATCH] Find size of SHA1 object without inflating everything.
This adds sha1_file_size() helper function and uses it in the
rename/copy similarity estimator. The helper function handles
deltified object as well.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
maint
Junio C Hamano20 years agocommitted byLinus Torvalds
@ -333,7 +333,6 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
@@ -333,7 +333,6 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
close(fd);
}
else {
/* We cannot do size only for SHA1 blobs */
char type[20];
struct sha1_size_cache *e;
@ -343,11 +342,13 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
@@ -343,11 +342,13 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)