[PATCH] Enhance sha1_file_size() into sha1_object_info()

This lets us eliminate one use of map_sha1_file() outside
sha1_file.c, to bring us one step closer to the packed GIT.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Junio C Hamano
2005-06-27 03:34:06 -07:00
committed by Linus Torvalds
parent c4584ae3fd
commit 36e4d74a21
4 changed files with 26 additions and 30 deletions

2
diff.c
View File

@ -425,7 +425,7 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
s->size = e->size;
return 0;
}
if (!sha1_file_size(s->sha1, &s->size))
if (!sha1_object_info(s->sha1, type, &s->size))
locate_size_cache(s->sha1, 0, s->size);
}
else {