Re: [PATCH v2 06/45] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-03-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/Documentation/technical/api-setup.txt > b/Documentation/technical/api-setup.txt > index 4f63a04..59a947e 100644 > --- a/Documentation/technical/api-setup.txt > +++ b/Documentation/technical/api-setup.txt > @@ -8,6 +8,23 @@ Talk about > * is_inside_gi

Re: [PATCH v2 06/45] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-03-20 Thread Eric Sunshine
On Wed, Mar 20, 2013 at 8:16 AM, Nguyễn Thái Ngọc Duy wrote: > +static void NORETURN unsupported_magic(const char *pattern, > + unsigned magic, > + unsigned short_magic) > +{ > + struct strbuf sb = STRBUF_INIT; > +

[PATCH v2 06/45] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-03-20 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