Re: [PATCH 03/15] do not create struct commit with xcalloc

2014-06-10 Thread Junio C Hamano
Jeff King p...@peff.net writes: In both blame and merge-recursive, we sometimes create a fake commit struct for convenience (e.g., to represent the HEAD state as if we would commit it). By allocating ourselves rather than using alloc_commit_node, we do not properly set the index field of the

Re: [PATCH 03/15] do not create struct commit with xcalloc

2014-06-10 Thread Jeff King
On Tue, Jun 10, 2014 at 02:35:48PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: In both blame and merge-recursive, we sometimes create a fake commit struct for convenience (e.g., to represent the HEAD state as if we would commit it). By allocating ourselves rather than

[PATCH 03/15] do not create struct commit with xcalloc

2014-06-09 Thread Jeff King
In both blame and merge-recursive, we sometimes create a fake commit struct for convenience (e.g., to represent the HEAD state as if we would commit it). By allocating ourselves rather than using alloc_commit_node, we do not properly set the index field of the commit. This can produce subtle bugs