From: Junio C Hamano Date: Wed, 27 Apr 2016 18:16:20 GMT Subject: Re: [PATCH 08/29] ref_transaction_commit(): remove local variable n Message-ID: In-Reply-To: <9c31a016aa893e4a3748e31ee3fd48562f63a7a7.1461768689.git.mhagger@alum.mit.edu> Michael Haggerty writes: > This microoptimization doesn't make a significant difference in speed. > And it causes problems if somebody ever wants to modify the function to > add updates to a transaction as part of processing it, as will happen > shortly. > > Make the same change in initial_ref_transaction_commit(). > > Signed-off-by: Michael Haggerty > --- This particular change also makes the end result easier to read. I have no objection to officially declaring that we do support "adding" new transaction update while we are committing (and we do not support other futzing like "removing" or "reordering"), either. I expect that somewhere in this series transaction->nr will not stay constant even if the client code of ref-transaction API makes no direct call that adds a new update[] element, though, even if it is not done in this patch. Thanks.