Re: [PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Duy Nguyen
On Sat, Jan 12, 2013 at 12:56 AM, Matt Kraai wrote: > On Fri, Jan 11, 2013 at 06:20:57PM +0700, Nguyễn Thái Ngọc Duy wrote: >> +#define PATHSPEC_FROMTOP(1<<0) > > The previous commit introduces a use of this macro in get_pathspec. > Should this be defined by that commit instead? This macro is

Re: [PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Matt Kraai
On Fri, Jan 11, 2013 at 06:20:57PM +0700, Nguyễn Thái Ngọc Duy wrote: > +#define PATHSPEC_FROMTOP(1<<0) The previous commit introduces a use of this macro in get_pathspec. Should this be defined by that commit instead? > @@ -266,9 +266,9 @@ static int pathspec_item_cmp(const void *a_, const v

[PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Nguyễn Thái Ngọc Duy
These call sites follow the pattern: paths = get_pathspec(prefix, argv); init_pathspec(&pathspec, paths); which can be converted into a single parse_pathspec() call. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/grep.c | 4 +--- builtin/ls-tree.c | 2 +- builtin/update-ind