git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Jonathan Tan <jonathantanmy@google.com>,
	git@vger.kernel.org, chriscool@tuxfamily.org
Subject: Re: [PATCH 2/2] fetch: do not override partial clone filter
Date: Tue, 22 Sep 2020 08:51:44 -0700	[thread overview]
Message-ID: <xmqqk0wllshb.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <b59f00b6-2787-261e-a295-35eb4a6f442b@gmail.com> (Derrick Stolee's message of "Tue, 22 Sep 2020 07:35:12 -0400")

Derrick Stolee <stolee@gmail.com> writes:

> On 9/22/2020 1:46 AM, Junio C Hamano wrote:
>> Jonathan Tan <jonathantanmy@google.com> writes:
>> 
>>> +test_expect_success 'ensure that filter is written to config' '
>>> +	FILTER=$(git -C client config --get remote.blah.partialclonefilter) &&
>>> +	test "$FILTER" == "blob:limit=0"
>> 
>> I'll do s/==/=/ locally because otherwise the test-lint-shell-syntax
>> will choke on this line.  No need to resend only this line.
>
> Wouldn't "test_cmp_config" be a better here? It seems like
> this is testing the "git clone" behavior of the previous test,
> so it could be added to that test instead.

TIL that one ;-) "git config --get" gives only a single instance,
but in this particular case, shouldn't we be verifying not just that
the expected one is found, but it is the only one, with "--get-all"?

FWIW, many uses of that test helper may want to be tightened the
same way.  In short, unless we are testing the last-one-wins
behaviour, and especially when we are interested in what changes our
tested operation makes to the config file's contents, we should be
using "--get-all" instead of the default "--get", I suspect.

Thanks.

  reply	other threads:[~2020-09-22 15:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22  3:03 [PATCH 0/2] Fix overriding of partial clone filter when lazy-fetching Jonathan Tan
2020-09-22  3:03 ` [PATCH 1/2] promisor-remote: remove unused variable Jonathan Tan
2020-09-22  3:03 ` [PATCH 2/2] fetch: do not override partial clone filter Jonathan Tan
2020-09-22  5:46   ` Junio C Hamano
2020-09-22 11:35     ` Derrick Stolee
2020-09-22 15:51       ` Junio C Hamano [this message]
2020-09-22  5:45 ` [PATCH 0/2] Fix overriding of partial clone filter when lazy-fetching Junio C Hamano
2020-09-28 22:26 ` [PATCH v2 " Jonathan Tan
2020-09-28 22:26   ` [PATCH v2 1/2] promisor-remote: remove unused variable Jonathan Tan
2020-09-28 22:26   ` [PATCH v2 2/2] fetch: do not override partial clone filter Jonathan Tan
2020-09-28 23:43     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqk0wllshb.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=stolee@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).