From: Nguyen Thai Ngoc Duy Date: Sun, 30 Oct 2011 09:17:43 GMT Subject: Re: [PATCH/WIP 05/11] symbolize return values of tree_entry_interesting() Message-ID: In-Reply-To: <7vbot2z3gf.fsf@alter.siamese.dyndns.org> 2011/10/28 Junio C Hamano : >>  static void skip_uninteresting(struct tree_desc *t, struct strbuf *base, >> -                            struct diff_options *opt, int *match) >> +                            struct diff_options *opt, >> +                            enum interesting *match) >>  { >>       while (t->size) { >>               *match = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec); >>               if (*match) { >> -                     if (*match < 0) >> +                     if (*match == all_entries_not_interesting) >>                               t->size = 0; >>                       break; >>               } > > The caller of this function needs to be updated as well. Yeah, thanks. > But I have to wonder why this skip_uninteresting() does not peek the > original value of *match and skip, which is the loop structure the other > caller of tree_entry_interesting() in this file has. Probably because no one asked that question before. I think it makes sense for skip_uninteresting() to skip t_e_i() when *match == -1 or 2. Thanks. -- Duy