Re: [PATCH 1/2] pathspec: allow querying for attributes
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 13, 2017, 18:30 UTC
- Message-ID
- <CAGZ79kYbkpjxJihZMh8W1sutjP1WtSE4FjXU3v-eFPYx0Pu_-g@mail.gmail.com>
- In-Reply-To
- <xmqqo9x5uc9u.fsf@gitster.mtv.corp.google.com>
Show 10 quoted lines
>> +test_expect_success 'fail if attr magic is used places not implemented' ' >> + # The main purpose of this test is to check that we actually fail >> + # when you attempt to use attr magic in commands that do not implement >> + # attr magic. This test does not advocate git-add to stay that way, >> + # though, but git-add is convenient as it has its own internal pathspec >> + # parsing. > > That's thought-provoking ;-) Would it help to add a test-pathspec > helper, similar to test-config helper, that serves as a vehicle to > test this?
I think that is a very good idea; looking through files mentioned by "ls t/ |grep pathspec" most of the tests for pathspecs are done with git-log currently, which also helps with DWIM checking, e.g. if the pathspec part can be interpreted as a ref instead.
So I wonder if such a test-pathspec helper would first only cover this test case of not supporting pathspecs, which sounds a bit counter intuitive.
Thanks, Stefan