Re: [GSoC][PATCH] tag: Make "git tag --contains <id>" less chatty if <id> is invalid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Beller <sbeller@xxxxxxxxxx> writes:

>> diff --git a/t/t7013-tag-contains.sh b/t/t7013-tag-contains.sh
>> new file mode 100755
>> index 000000000..65119dada
>> --- /dev/null
>> +++ b/t/t7013-tag-contains.sh
>
> Thanks for adding the tests into a new file instead of putting it somewhere
> where it is already convenient. (We have too many of those "just add it there
> as it is easiest to fit in")

Careful, as that cuts both ways.  We want to strongly encourage
people to see if there is already a place that is a good enough fit
for new tests before adding small test scripts randomly to consume
the test serial numbers and test process start-up cost.  Only when
there is nowhere appropriate, we do want to add.  And if this covers
both tag and branch, then a new script may be appropriate but it
shouldn't limit its future enhancement (to test 'git branch') by
having 'tag' to pretend that this file must be limited to 'git tag'.

> So I'd expect the return code to be 0 (if we don't care) or 1
> (if we do care), in the case of 1, we shall write:
>
>   test_must_fail git tag --contains ... &&
>   grep ....
>
> (A long way of hinting at the test_must_fail test function,
> that lives in t/test-lib-functions.sh)

If you are looking at error stream, it is very likely that you would
want to study test_i18ngrep and use it, as errors are fair game for
i18n (and possibly coloring, which is a near-by topic).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux