On Thu, Jun 27, 2019 at 01:42:45AM -0400, Eric Sunshine wrote:
> On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer <emilyshaf...@google.com> wrote:
> > Demonstrate how filter specs can be used when performing a revision walk
> > of all object types. In this case, tree depth is used. Contributors who
> > are following the revision walking tutorial will be encouraged to run
> > the revision walk with and without the filter in order to compare the
> > number of objects seen in each case.
> >
> > Signed-off-by: Emily Shaffer <emilyshaf...@google.com>
> > ---
> > diff --git a/builtin/walken.c b/builtin/walken.c
> > @@ -143,6 +144,10 @@ static void walken_show_object(struct object *obj, 
> > const char *str, void *buf)
> >  static void walken_object_walk(struct rev_info *rev)
> >  {
> > +       struct list_objects_filter_options filter_options = {};
> > +
> > +       printf("walken_object_walk beginning...\n");
> 
> Is this debugging code which you accidentally left in? Or is it meant
> to use trace_printf()? Or something else? If it is a genuine message,
> should it be localizable?

The former. Removed.

> 
> > @@ -157,7 +162,24 @@ static void walken_object_walk(struct rev_info *rev)
> >         blob_count = 0;
> >         tree_count = 0;
> >
> > -       traverse_commit_list(rev, walken_show_commit, walken_show_object, 
> > NULL);
> > +       if (1) {
> > +               /* Unfiltered: */
> 
> The subject talks about adding a _filtered_ object walk (which is in
> the 'else' arm), so should this be "if (0)" instead?

Done.

Reply via email to