From: karthik nayak <karthik.188@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Git <git@vger.kernel.org>, Christian Couder <christian.couder@gmail.com>
Subject: Re: [PATCH v2 01/11] t6301: for-each-ref tests for ref-filter APIs
Date: Sun, 14 Jun 2015 14:02:54 +0530 [thread overview]
Message-ID: <CAOLa=ZRC+mZmXKJnrDFdM9oy4+WrWC0rg7kj_bpNCf=iRSVG2g@mail.gmail.com> (raw)
In-Reply-To: <vpqvbeqd7y5.fsf@anie.imag.fr>
On Sun, Jun 14, 2015 at 1:42 PM, Matthieu Moy
<Matthieu.Moy@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> +test_expect_success 'setup some history and refs' '
>> + test_commit one &&
>> + test_commit two &&
>> + test_commit three &&
>> + git checkout -b side &&
>> + test_commit four &&
>> + git checkout master &&
>> + git update-ref refs/odd/spot master
>
> I think you want more corner-cases here. For example,
> refs/headsfoo/master should not match refs/heads, and it's easy to write
> an incorrect implementation for this => test.
Like you mentioned below, currently it's redundant with t6300 and its
purpose is to add tests for new functionality we provide to for-each-ref
via ref-filter. This is done in the next few patches in this series.
>
>> +'
>> +test_expect_success 'filtering by leading name' '
>
> Blank line between tests please.
Noted. Thanks.
>
>> + cat >expect <<-\EOF &&
>> + refs/heads/master
>> + refs/heads/side
>> + EOF
>> + git for-each-ref --format="%(refname)" refs/heads >actual &&
>> + test_cmp expect actual
>> +'
>
> Isn't this test redundant with the content of t6300-for-each-ref.sh?
>
> At this point, you've done only internal refactoring, so you shouldn't
> need new tests (except to fix coverage holes in existing tests).
>
> I guess you're adding this to build more tests on top, but the commit
> message should clarify this.
>
I'll add a note to the commit message about how this test file is so
that we can integrate
more tests in the future for functionality given to for-each-ref via
ref-filter APIs.
--
Regards,
Karthik Nayak
prev parent reply other threads:[~2015-06-14 8:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-13 20:17 [PATCH v2 00/11] add options to for-each-ref karthik nayak
2015-06-13 20:18 ` [PATCH v2 01/11] t6301: for-each-ref tests for ref-filter APIs Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 02/11] tag: libify parse_opt_points_at() Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 03/11] ref-filter: implement '--points-at' option Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 04/11] for-each-ref: add " Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 05/11] ref-filter: add parse_opt_merge_filter() Karthik Nayak
2015-06-14 5:49 ` Christian Couder
2015-06-14 6:49 ` karthik nayak
2015-06-13 20:18 ` [PATCH v2 06/11] ref-filter: implement '--merged' and '--no-merged' options Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 07/11] for-each-ref: add " Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 08/11] parse-option: rename parse_opt_with_commit() Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 09/11] parse-options.h: add macros for '--contains' option Karthik Nayak
2015-06-14 6:13 ` Christian Couder
2015-06-14 6:58 ` karthik nayak
2015-06-15 19:27 ` Junio C Hamano
2015-06-15 20:49 ` karthik nayak
2015-06-13 20:18 ` [PATCH v2 10/11] ref-filter: implement " Karthik Nayak
2015-06-13 20:18 ` [PATCH v2 11/11] for-each-ref: add " Karthik Nayak
2015-06-14 8:12 ` [PATCH v2 01/11] t6301: for-each-ref tests for ref-filter APIs Matthieu Moy
2015-06-14 8:32 ` karthik nayak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOLa=ZRC+mZmXKJnrDFdM9oy4+WrWC0rg7kj_bpNCf=iRSVG2g@mail.gmail.com' \
--to=karthik.188@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).