From: Elijah Newren Date: Thu, 26 Aug 2010 02:49:32 GMT Subject: Re: [PATCH 2/7] Fix ignoring of pathspecs with rev-list --objects Message-ID: In-Reply-To: On Wed, Aug 25, 2010 at 5:50 PM, Elijah Newren wrote: > On Wed, Aug 25, 2010 at 4:11 PM, Nguyen Thai Ngoc Duy wrote: >> >> I wonder if we can avoid xmalloc/free so many times here. If full_path >> is unchanged, how about moving it outside the loop? > > Good point. > > Thanks, but I just found a bug with it; I'm investigating. tree_entry_interesting assumes base[baselen-1] == '/' || baselen == 0; it will fail to notice matches if this precondition is not met, and I failed to meet it except for files at the toplevel tree. I'll send out an updated series with a fix for this and the improvement you suggested.