Re: [PATCH v2 2/4] fsck: do not die when not enough memory to examine a pack entry

2014-06-28 Thread Duy Nguyen
On Fri, Jun 27, 2014 at 1:09 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> fsck is a tool that error() is more preferred than die(), but many > > "more preferred" without justifying why it is "more preferred" is > not quite a justification, is it? Also, an object failing to load

Re: [PATCH v2 2/4] fsck: do not die when not enough memory to examine a pack entry

2014-06-26 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > fsck is a tool that error() is more preferred than die(), but many "more preferred" without justifying why it is "more preferred" is not quite a justification, is it? Also, an object failing to load in-core is not a missing object, so if your aim is to let "fsck"

[PATCH v2 2/4] fsck: do not die when not enough memory to examine a pack entry

2014-06-24 Thread Nguyễn Thái Ngọc Duy
fsck is a tool that error() is more preferred than die(), but many functions embed die() inside beyond fsck's control. unpack_compressed_entry()'s using xmallocz is such a function, triggered from verify_packfile() -> unpack_entry(). Make it use xmallocz_gentle() instead. Noticed-by: Dale R. Worle