git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: "Samuel Čavoj" <samuel@cavoj.net>,
	git@vger.kernel.org,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v2 1/2] sequencer: fix gpg option passed to merge subcommand
Date: Fri, 16 Oct 2020 13:15:24 -0700	[thread overview]
Message-ID: <xmqq8sc6apwj.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <31ce457b-e71c-0ca0-e5be-a9aebb9cf785@gmail.com> (Phillip Wood's message of "Fri, 16 Oct 2020 14:40:00 +0100")

Phillip Wood <phillip.wood123@gmail.com> writes:

> What is "natural" is subjective but what is the default config is
> not. If test scripts set random config variables and assumes that they
> will be ...
> ... cleared how are new contributors supposed to figure it out? If each
> test starts with the default config it is much easier to reason about
> it.

If this were a test script with many tests, all of which depend on
starting from clean slate wrt the configuration variable space, and
if you are adding just one or two tests that wants to run with
configuration variable in effect, the story would be quite
different.  For example, I would think it would make a lot of sense
in <20201014232517.3068298-1-emilyshaffer@google.com> to use
test_config instead of "git config" as it is clear that leading 100+
lines of tests run with the default configuration, and it is sane to
expact that later tests that may be added in the future would be the
same.

Look at the test script in question again and notice that it is
about seeing behaviour with the single configuration variable set to
true or false.  Using test_config would still signal the test pieces
that use it do depend on the shown setting of the variable, but it
does not help at all the test pieces that wants to see what happens
when there is no configuration.  Explicitly using "git config" and
"test_unconfig" actually would _help_ reviewers who only looks
between the pre- and post- context lines that are affected by the
patch, as they do not have to know or assume that "normal state is
nothing configured" (which needs to be verified by seeing all the
existing tests that are not shown in the patch use test_config to
clear the setting when they are done).

All of the above would be obvious once you think about it, I'd
think.

Thanks.


      parent reply	other threads:[~2020-10-16 20:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 23:49 [PATCH v2 1/2] sequencer: fix gpg option passed to merge subcommand Samuel Čavoj
2020-10-12 23:49 ` [PATCH v2 2/2] sequencer: pass explicit --no-gpg-sign to merge Samuel Čavoj
2020-10-13  4:46   ` Junio C Hamano
2020-10-13 10:03   ` Phillip Wood
2020-10-12 23:52 ` [PATCH v2 1/2] sequencer: fix gpg option passed to merge subcommand Samuel Čavoj
2020-10-13  9:55 ` Phillip Wood
2020-10-13 10:43   ` Samuel Čavoj
2020-10-13 13:15     ` Phillip Wood
2020-10-13 10:02 ` Phillip Wood
2020-10-13 10:51   ` Samuel Čavoj
2020-10-13 13:28     ` Phillip Wood
2020-10-13 22:06   ` Junio C Hamano
2020-10-13 23:45     ` Samuel Čavoj
2020-10-14 15:31       ` Junio C Hamano
2020-10-16 13:40     ` Phillip Wood
2020-10-16 16:37       ` Junio C Hamano
2020-10-16 17:25         ` Phillip Wood
2020-10-16 20:15       ` Junio C Hamano [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=xmqq8sc6apwj.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood123@gmail.com \
    --cc=samuel@cavoj.net \
    --cc=sandals@crustytoothpaste.net \
    /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).