Re: [PATCH 02/21] Add parse_pathspec() that converts cmdline args to struct pathspec
- From
Martin von Zweigbergk <martinvonz@gmail.com>
- Date
- Jan 10, 2013, 23:26 UTC
- Message-ID
- <CANiSa6iUqZ7E9NWgMfR3bUxZoyhjO2Jz+Z=yjs9vkfmbit7SOg@mail.gmail.com>
- In-Reply-To
- <1357453268-12543-3-git-send-email-pclouds@gmail.com>
On Sat, Jan 5, 2013 at 10:20 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 6 quoted lines
> + > + /* 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 wondering if a flag switching between "no argument -> prefix pathspec" and "no argument -> no pathspec" would be worthwhile. I think e.g. 'add' and 'clean' would use the former , while 'reset' and 'commit' would use the latter. Since you're now changing all the callers of get_pathspec(), it seems like the perfect time to ask this question. What do you think?