Re: [PATCH v3 2/2] alloc.c: remove the redundant commit_count variable

2014-07-11 Thread Ramsay Jones
On 11/07/14 09:32, Jeff King wrote: > On Fri, Jul 11, 2014 at 01:59:53AM +0100, Ramsay Jones wrote: > >>> The code you're touching here was trying to make sure that each commit >>> gets a unique index, under the assumption that commits only get >>> allocated via alloc_commit_node. But I think that

Re: [PATCH v3 2/2] alloc.c: remove the redundant commit_count variable

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 01:59:53AM +0100, Ramsay Jones wrote: > > The code you're touching here was trying to make sure that each commit > > gets a unique index, under the assumption that commits only get > > allocated via alloc_commit_node. But I think that assumption is wrong. > > We can also ge

Re: [PATCH v3 2/2] alloc.c: remove the redundant commit_count variable

2014-07-10 Thread Ramsay Jones
On 11/07/14 01:30, Jeff King wrote: > On Fri, Jul 11, 2014 at 12:59:48AM +0100, Ramsay Jones wrote: > >> The 'commit_count' static variable is used in alloc_commit_node() >> to set the 'index' field of the commit structure to a unique value. >> This variable assumes the same value as the 'count' f

Re: [PATCH v3 2/2] alloc.c: remove the redundant commit_count variable

2014-07-10 Thread Jeff King
On Fri, Jul 11, 2014 at 12:59:48AM +0100, Ramsay Jones wrote: > The 'commit_count' static variable is used in alloc_commit_node() > to set the 'index' field of the commit structure to a unique value. > This variable assumes the same value as the 'count' field of the > 'commit_state' allocator stat

[PATCH v3 2/2] alloc.c: remove the redundant commit_count variable

2014-07-10 Thread Ramsay Jones
The 'commit_count' static variable is used in alloc_commit_node() to set the 'index' field of the commit structure to a unique value. This variable assumes the same value as the 'count' field of the 'commit_state' allocator state structure, which may be used in its place. Signed-off-by: Ramsay Jo