Re: [PATCH v3 08/31] parse_pathspec: add PATHSPEC_EMPTY_MATCH_ALL
- From
Martin von Zweigbergk <martinvonz@gmail.com>
- Date
- Jan 21, 2013, 23:12 UTC
- Message-ID
- <CANiSa6gfTxOWzMg7V19PntDBhU4kW6qpa+K2XjnWgzNRXDKRSw@mail.gmail.com>
- In-Reply-To
- <1358080539-17436-9-git-send-email-pclouds@gmail.com>
Hi,
I was tempted to ask this before, and the recent thread regarding "add -u/A" [1] convinced me to.
On Sun, Jan 13, 2013 at 4:35 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 8 quoted lines
> We have two ways of dealing with empty pathspec: > > 1. limit it to current prefix > 2. match the entire working directory > > Some commands go with #1, some with #2. get_pathspec() and > parse_pathspec() only supports #1. Make it support #2 too via > PATHSPEC_EMPTY_MATCH_ALL flag.
If #2 is indeed the direction we want to go, then maybe we should make that the default behavior from parse_pathspec()? I.e. rename the flag "PATHSPEC_EMPTY_MATCH_PREFIX" (or something). Makes sense?
Btw, Matthieu was asking where we use #1. If you do invert the name and meaning of the flag, then the answer to that question should be (mostly?) obvious from a re-roll of your series (i.e. all the places where PATHSPEC_EMPTY_MATCH_PREFIX is used).
Martin
[1] http://thread.gmane.org/gmane.comp.version-control.git/213988/focus=214113