All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org, christian.couder@gmail.com
Subject: Re: [PATCH v2 01/11] t6301: for-each-ref tests for ref-filter APIs
Date: Sun, 14 Jun 2015 10:12:50 +0200	[thread overview]
Message-ID: <vpqvbeqd7y5.fsf@anie.imag.fr> (raw)
In-Reply-To: <1434226706-3764-1-git-send-email-karthik.188@gmail.com> (Karthik Nayak's message of "Sun, 14 Jun 2015 01:48:16 +0530")

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.

> +'
> +test_expect_success 'filtering by leading name' '

Blank line between tests please.

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

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  parent reply	other threads:[~2015-06-14  8:13 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   ` Matthieu Moy [this message]
2015-06-14  8:32     ` [PATCH v2 01/11] t6301: for-each-ref tests for ref-filter APIs karthik nayak

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=vpqvbeqd7y5.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.