Re: [PATCH v3 4/6] list-objects: filter objects in traverse_commit_list

2017-11-16 Thread Jeff Hostetler
On 11/8/2017 12:01 AM, Junio C Hamano wrote: Jonathan Tan writes: Having said that, though, it might be safer to still introduce one, and relax it later if necessary - it is much easier to relax a constraint than to increase one. It would also be more error prone

Re: [PATCH v3 4/6] list-objects: filter objects in traverse_commit_list

2017-11-16 Thread Jeff Hostetler
On 11/7/2017 6:20 PM, Jonathan Tan wrote: On Tue, 7 Nov 2017 19:35:44 + Jeff Hostetler wrote: +/* + * Reject the arg if it contains any characters that might + * require quoting or escaping when handing to a sub-command. + */ +static int

Re: [PATCH v3 4/6] list-objects: filter objects in traverse_commit_list

2017-11-07 Thread Junio C Hamano
Jonathan Tan writes: > Having said that, though, it might be safer to still introduce one, and > relax it later if necessary - it is much easier to relax a constraint > than to increase one. It would also be more error prone to have such a long switch () statement,

Re: [PATCH v3 4/6] list-objects: filter objects in traverse_commit_list

2017-11-07 Thread Jonathan Tan
On Tue, 7 Nov 2017 19:35:44 + Jeff Hostetler wrote: > +/* > + * Reject the arg if it contains any characters that might > + * require quoting or escaping when handing to a sub-command. > + */ > +static int reject_injection_chars(const char *arg) > +{ [snip] > +}

[PATCH v3 4/6] list-objects: filter objects in traverse_commit_list

2017-11-07 Thread Jeff Hostetler
From: Jeff Hostetler Create traverse_commit_list_filtered() and add filtering interface to allow certain objects to be omitted from the traversal. Update traverse_commit_list() to be a wrapper for the above with a null filter to minimize the number of callers that needed