Re: [PATCH 2/7] Fix ignoring of pathspecs with rev-list --objects
- From
Elijah Newren <newren@gmail.com>
- Date
- Aug 26, 2010, 02:49 UTC
- Message-ID
- <AANLkTimRLUwB7ycnaUGjpztLYtN7SoLyA8rXvYDqfi4P@mail.gmail.com>
- In-Reply-To
- <AANLkTimCv-fn-h21pM8L9NiGg3w7OXBJ-kfiC+HJLsTP@mail.gmail.com>
On Wed, Aug 25, 2010 at 5:50 PM, Elijah Newren <newren@gmail.com> wrote:
Show 7 quoted lines
> On Wed, Aug 25, 2010 at 4:11 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> 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. >
<snip>
> 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.