Re: [PATCH 02/21] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-10 Thread Duy Nguyen
On Fri, Jan 11, 2013 at 6:26 AM, Martin von Zweigbergk wrote: > On Sat, Jan 5, 2013 at 10:20 PM, Nguyễn Thái Ngọc Duy > wrote: >> + >> + /* No arguments, no prefix -> no pathspec */ >> + if (!entry && !prefix) >> + return; >> >> + /* No arguments with prefix -> pr

Re: [PATCH 02/21] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-10 Thread Martin von Zweigbergk
On Sat, Jan 5, 2013 at 10:20 PM, Nguyễn Thái Ngọc Duy wrote: > + > + /* No arguments, no prefix -> no pathspec */ > + if (!entry && !prefix) > + return; > > + /* No arguments with prefix -> prefix pathspec */ When working with the old get_pathspec(), I remember won

[PATCH 02/21] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-05 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