Re: [PATCH v3 03/31] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-13 Thread Duy Nguyen
On Mon, Jan 14, 2013 at 7:05 AM, Martin von Zweigbergk wrote: > On Sun, Jan 13, 2013 at 4:35 AM, Nguyễn Thái Ngọc Duy > wrote: >> +static void parse_pathspec(struct pathspec *pathspec, >> + unsigned magic_mask, unsigned flags, >> + const char *pr

Re: [PATCH v3 03/31] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-13 Thread Martin von Zweigbergk
On Sun, Jan 13, 2013 at 4:35 AM, Nguyễn Thái Ngọc Duy wrote: > +static void parse_pathspec(struct pathspec *pathspec, > + unsigned magic_mask, unsigned flags, > + const char *prefix, const char **argv) > +{ > + struct pathspec_item *item; > +

[PATCH v3 03/31] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Currently to fill a struct pathspec, we do: const char **paths; paths = get_pathspec(prefix, argv); ... init_pathspec(&pathspec, paths); "paths" can only carry bare strings, which loses information from command line arguments such as pathspec magic or the prefix part's length for each