Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-15 Thread Adam Spiers
On Mon, Apr 15, 2013 at 09:48:22AM +1000, Duy Nguyen wrote: > On Mon, Apr 15, 2013 at 9:25 AM, Adam Spiers wrote: > >> > The introduction of argc also makes it possible to invoke > >> > check_ignore() with arguments which are not self-consistent. > >> > >> This is the same problem with main() > >

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-14 Thread Duy Nguyen
On Mon, Apr 15, 2013 at 9:25 AM, Adam Spiers wrote: >> > The introduction of argc also makes it possible to invoke >> > check_ignore() with arguments which are not self-consistent. >> >> This is the same problem with main() > > How could main() be invoked with argc inconsistent with argv? The poi

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-14 Thread Adam Spiers
On Sat, Apr 13, 2013 at 09:09:33AM +1000, Duy Nguyen wrote: > On Sat, Apr 13, 2013 at 1:03 AM, Adam Spiers wrote: > >> -static int check_ignore(const char *prefix, const char **pathspec) > >> +static int check_ignore(int argc, const char **argv, const char *prefix) > >> { > >> struct dir_st

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-12 Thread Duy Nguyen
On Sat, Apr 13, 2013 at 1:03 AM, Adam Spiers wrote: >> -static int check_ignore(const char *prefix, const char **pathspec) >> +static int check_ignore(int argc, const char **argv, const char *prefix) >> { >> struct dir_struct dir; >> - const char *path, *full_path; >> char *seen;

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-12 Thread Adam Spiers
On Fri, Mar 15, 2013 at 01:06:38PM +0700, Nguyễn Thái Ngọc Duy wrote: > check-ignore (at least the test suite) seems to rely on the pattern > order. PATHSPEC_KEEP_ORDER is introduced to explictly express this. > The lack of PATHSPEC_MAXDEPTH_VALID is sufficient because it's the > only flag that reo

[PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-03-14 Thread Nguyễn Thái Ngọc Duy
check-ignore (at least the test suite) seems to rely on the pattern order. PATHSPEC_KEEP_ORDER is introduced to explictly express this. The lack of PATHSPEC_MAXDEPTH_VALID is sufficient because it's the only flag that reorders pathspecs, but it's less obvious that way. Signed-off-by: Nguyễn Thái N