hash_object: correction for zero length file
authorDmitry Potapov <redacted>
Mon, 10 May 2010 21:38:17 +0000 (01:38 +0400)
committerJunio C Hamano <redacted>
Wed, 19 May 2010 04:46:36 +0000 (21:46 -0700)
commit08bda2085cc095863888bb4bb7a73960a9a379fd
treeaa76877c238015bbd12b801064bd66ea5248b5fd
parent3368edd4cda6306d524e10758e2c5a187dcd4ba6
hash_object: correction for zero length file

The check whether size is zero was done after if size <= SMALL_FILE_SIZE,
as result, zero size case was never triggered. Instead zero length file
was treated as any other small file. This did not caused any problem, but
if we have a special case for size equal to zero, it is better to make it
work and avoid redundant malloc().

Signed-off-by: Dmitry Potapov <redacted>
Signed-off-by: Junio C Hamano <redacted>
sha1_file.c
git clone https://git.99rst.org/PROJECT