Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-06 Thread Nguyen Thai Ngoc Duy
On Thu, Sep 6, 2012 at 10:21 AM, Junio C Hamano gits...@pobox.com wrote: Nguyen Thai Ngoc Duy pclo...@gmail.com writes: We could introduce exclude_path() and kill path_excluded() then. There are just about 5-6 call sites to replace. The name path_excluded(... path ...) sounds like it is

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-06 Thread Thiago Farina
On Thu, Sep 6, 2012 at 9:13 AM, Nguyen Thai Ngoc Duy pclo...@gmail.com wrote: On Thu, Sep 6, 2012 at 10:21 AM, Junio C Hamano gits...@pobox.com wrote: Nguyen Thai Ngoc Duy pclo...@gmail.com writes: We could introduce exclude_path() and kill path_excluded() then. There are just about 5-6 call

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-06 Thread Nguyen Thai Ngoc Duy
On Thu, Sep 6, 2012 at 9:59 PM, Thiago Farina tfrans...@gmail.com wrote: On Thu, Sep 6, 2012 at 9:13 AM, Nguyen Thai Ngoc Duy pclo...@gmail.com wrote: On Thu, Sep 6, 2012 at 10:21 AM, Junio C Hamano gits...@pobox.com wrote: Nguyen Thai Ngoc Duy pclo...@gmail.com writes: We could introduce

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-06 Thread Adam Spiers
On Thu, Sep 6, 2012 at 4:05 PM, Nguyen Thai Ngoc Duy pclo...@gmail.com wrote: On Thu, Sep 6, 2012 at 9:59 PM, Thiago Farina tfrans...@gmail.com wrote: On Thu, Sep 6, 2012 at 9:13 AM, Nguyen Thai Ngoc Duy pclo...@gmail.com wrote: On Thu, Sep 6, 2012 at 10:21 AM, Junio C Hamano

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-05 Thread Nguyen Thai Ngoc Duy
On Wed, Sep 5, 2012 at 12:23 AM, Junio C Hamano gits...@pobox.com wrote: Nguyen Thai Ngoc Duy pclo...@gmail.com writes: On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers g...@adamspiers.org wrote: extern void path_exclude_check_init(struct path_exclude_check *, struct dir_struct *); extern void

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-05 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com writes: We could introduce exclude_path() and kill path_excluded() then. There are just about 5-6 call sites to replace. The name path_excluded(... path ...) sounds like it is asking a yes/no question is this path excluded?, which actually is what is

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-04 Thread Nguyen Thai Ngoc Duy
On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers g...@adamspiers.org wrote: extern void path_exclude_check_init(struct path_exclude_check *, struct dir_struct *); extern void path_exclude_check_clear(struct path_exclude_check *); +extern struct exclude *path_excluded_1(struct path_exclude_check

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-04 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com writes: On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers g...@adamspiers.org wrote: extern void path_exclude_check_init(struct path_exclude_check *, struct dir_struct *); extern void path_exclude_check_clear(struct path_exclude_check *); +extern struct

[PATCH 5/9] Refactor excluded and path_excluded

2012-09-01 Thread Adam Spiers
In a similar way to the previous commit, this extracts new helper functions excluded_1() and path_excluded_1() which return the last exclude_list element which matched, or NULL if no match was found. excluded() and path_excluded() become wrappers around these, and just return 0 or 1 depending on