Web lists-archives.com

Re: [PATCH 1/2] pathspec: allow querying for attributes




>> +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