Re: [PATCH v6 04/11] for-each-ref: add '--points-at' option
On Mon, Jun 29, 2015 at 11:16 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> Add the '--points-at' option provided by 'ref-filter'. The option
>> lets the user to pick only refs which point to a particular
>> commit.
>
> It somehow feels strange that the option name is points-at and all
> the explanation (like the above and also in the doc) talks about
> pointing to an object. Not limited to this patch but the previous
> one had the same, I think.
>
Will have a look and change, thanks :)
Show 33 quoted lines
>> diff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh
>> index b1fa8d4..7269a66 100644
>> --- a/t/t6302-for-each-ref-filter.sh
>> +++ b/t/t6302-for-each-ref-filter.sh
>> @@ -16,4 +16,24 @@ test_expect_success 'setup some history and refs' '
>> git update-ref refs/odd/spot master
>> '
>>
>> +test_expect_success 'filtering with --points-at' '
>> + cat >expect <<-\EOF &&
>> + refs/heads/master
>> + refs/odd/spot
>> + refs/tags/three
>> + EOF
>> + git for-each-ref --format="%(refname)" --points-at=master >actual &&
>> + test_cmp expect actual
>> +'
>> +
>> +test_expect_success 'check signed tags with --points-at' '
>> + cat >expect <<-\EOF &&
>> + refs/heads/side
>> + refs/tags/four
>> + refs/tags/signed-tag four
>> + EOF
>> + git for-each-ref --format="%(refname) %(*subject)" --points-at=side >actual &&
>> + test_cmp expect actual
>> +'
>
> This shows that we would want to add a "annotated doubly" tag in the
> preparation step 01/11; the expected outcome is that it will not
> show in the output, I think.
>
> Thanks.
--
Regards,
Karthik Nayak