Re: [PATCH 08/13] list-objects: add traverse_commit_list_filtered method
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Oct 25, 2017, 04:24 UTC
- Message-ID
- <CAGf8dgLU_70vq8JNpr-cihgk9SbC_7GYcaEF6c9NgmJRXPAcmw@mail.gmail.com>
- In-Reply-To
- <20171024185332.57261-9-git@jeffhostetler.com>
On Tue, Oct 24, 2017 at 11:53 AM, Jeff Hostetler <git@jeffhostetler.com> wrote:
Show 7 quoted lines
> +void traverse_commit_list_filtered( > + struct list_objects_filter_options *filter_options, > + struct rev_info *revs, > + show_commit_fn show_commit, > + show_object_fn show_object, > + list_objects_filter_map_foreach_cb print_omitted_object, > + void *show_data);
So the function call chain, if we wanted a filtered traversal, is: traverse_commit_list_filtered -> traverse_commit_list__sparse_path (and friends, and each algorithm is in its own file) -> traverse_commit_list_worker
This makes the implementation of each algorithm more easily understood (since they are all in their own files), but also increases the number of global functions and code files. I personally would combine the traverse_commit_list__* functions into one file (list-objects-filtered.c), make them static, and also put traverse_commit_list_filtered in there, but I understand that other people in the Git project may differ on this.