Re: [PATCH v6 04/11] for-each-ref: add '--points-at' option

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

 



Karthik Nayak <karthik.188@xxxxxxxxx> 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.

> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]