From: Junio C Hamano Date: Wed, 04 Apr 2007 19:22:40 GMT Subject: Re: [PATCH 1/2] Added use of xmalloc() on diff-delta.c Message-ID: <7vejn02bcv.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <11757126093105-git-send-email-ribas@c3sl.ufpr.br> These two functions, create_delta_index() and create_delta(), are already nicely libified. They allow the caller to deal with oom condition. The caller may die(), or it may decide to continue its operation with reduced functionality without using delta data. A good example of this is found a few lines after the lines the second patch touches. When create_delta() cannot find memory to work with, the entire function returns 0, saying "sorry, cannot deltify these two", which would cause the object stored without deltification. These patches take that nice property away, making libification more difficult, which is the downside. Is there an upside? If anything, I suspect that the part that calls die() you touched in the second patch could return NULL.