From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Jeff King <peff@peff.net>,
Eric Sunshine <sunshine@sunshineco.com>,
Christian Couder <christian.couder@gmail.com>
Subject: Re: [PATCH v3 10/10] fsck: test and document unknown fsck.<msg-id> values
Date: Fri, 27 Jul 2018 14:43:13 -0700 [thread overview]
Message-ID: <xmqqbmasl5hq.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180727143720.14948-11-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Fri, 27 Jul 2018 14:37:20 +0000")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> When fsck.<msg-id> is set to an unknown value it'll cause "fsck" to
> die, but the same is not rue of the "fetch" and "receive"
> variants. Document this and test for it.
Interesting. Before documenting and adding a test to cast the
current behaviour in stone, do we need to see if the discrepancy is
desired and designed one, or something we may want to fix?
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> Documentation/config.txt | 4 ++++
> t/t5504-fetch-receive-strict.sh | 14 ++++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 57c463c6e2..4cead6119a 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1637,6 +1637,10 @@ In general, it is better to enumerate existing objects with problems
> with `fsck.skipList`, instead of listing the kind of breakages these
> problematic objects share to be ignored, as doing the latter will
> allow new instances of the same breakages go unnoticed.
> ++
> +Setting an unknown `fsck.<msg-id>` value will cause fsck to die, but
> +doing the same for `receive.fsck.<msg-id>` and `fetch.fsck.<msg-id>`
> +will only cause git to warn.
>
> fsck.skipList::
> The path to a sorted list of object names (i.e. one SHA-1 per
> diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh
> index 7f06b537d3..62f3569891 100755
> --- a/t/t5504-fetch-receive-strict.sh
> +++ b/t/t5504-fetch-receive-strict.sh
> @@ -198,6 +198,10 @@ test_expect_success 'fetch with fetch.fsck.skipList' '
> git --git-dir=dst/.git fetch "file://$(pwd)" $refspec
> '
>
> +test_expect_success 'fsck.<unknownmsg-id> dies' '
> + test_must_fail git -c fsck.whatEver=ignore fsck 2>err &&
> + test_i18ngrep "Unhandled message id: whatever" err
> +'
>
> test_expect_success 'push with receive.fsck.missingEmail=warn' '
> commit="$(git hash-object -t commit -w --stdin <bogus-commit)" &&
> @@ -211,10 +215,15 @@ test_expect_success 'push with receive.fsck.missingEmail=warn' '
> git --git-dir=dst/.git config fsck.missingEmail warn &&
> test_must_fail git push --porcelain dst bogus &&
>
> + # receive.fsck.<unknownmsg-id> warns
> + git --git-dir=dst/.git config \
> + receive.fsck.whatEver error &&
> +
> git --git-dir=dst/.git config \
> receive.fsck.missingEmail warn &&
> git push --porcelain dst bogus >act 2>&1 &&
> grep "missingEmail" act &&
> + test_i18ngrep "Skipping unknown msg id.*whatever" act &&
> git --git-dir=dst/.git branch -D bogus &&
> git --git-dir=dst/.git config --add \
> receive.fsck.missingEmail ignore &&
> @@ -235,10 +244,15 @@ test_expect_success 'fetch with fetch.fsck.missingEmail=warn' '
> git --git-dir=dst/.git config fsck.missingEmail warn &&
> test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
>
> + # receive.fsck.<unknownmsg-id> warns
> + git --git-dir=dst/.git config \
> + fetch.fsck.whatEver error &&
> +
> git --git-dir=dst/.git config \
> fetch.fsck.missingEmail warn &&
> git --git-dir=dst/.git fetch "file://$(pwd)" $refspec >act 2>&1 &&
> grep "missingEmail" act &&
> + test_i18ngrep "Skipping unknown msg id.*whatever" act &&
> rm -rf dst &&
> git init dst &&
> git --git-dir=dst/.git config fetch.fsckobjects true &&
next prev parent reply other threads:[~2018-07-27 21:43 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-24 15:25 BUG: No way to set fsck.<msg-id> when cloning Ævar Arnfjörð Bjarmason
2018-05-24 15:58 ` Kevin Daudt
2018-05-24 17:04 ` Ævar Arnfjörð Bjarmason
2018-05-24 19:02 ` Jeff King
2018-05-24 19:35 ` [PATCH 0/4] fsck: doc fixes & fetch.fsck.* implementation Ævar Arnfjörð Bjarmason
2018-05-25 19:28 ` [PATCH v2 0/5] " Ævar Arnfjörð Bjarmason
2018-07-27 14:37 ` [PATCH v3 00/10] " Ævar Arnfjörð Bjarmason
2018-07-30 22:13 ` SZEDER Gábor
2018-07-27 14:37 ` [PATCH v3 01/10] receive.fsck.<msg-id> tests: remove dead code Ævar Arnfjörð Bjarmason
2018-07-27 19:11 ` Junio C Hamano
2018-07-27 19:45 ` Ævar Arnfjörð Bjarmason
2018-07-27 22:19 ` Junio C Hamano
2018-07-27 14:37 ` [PATCH v3 02/10] config doc: don't describe *.fetchObjects twice Ævar Arnfjörð Bjarmason
2018-07-27 19:19 ` Junio C Hamano
2018-07-27 14:37 ` [PATCH v3 03/10] config doc: unify the description of fsck.* and receive.fsck.* Ævar Arnfjörð Bjarmason
2018-07-27 19:29 ` Junio C Hamano
2018-07-27 14:37 ` [PATCH v3 04/10] config doc: elaborate on what transfer.fsckObjects does Ævar Arnfjörð Bjarmason
2018-07-27 19:41 ` Junio C Hamano
2018-07-27 14:37 ` [PATCH v3 05/10] config doc: elaborate on fetch.fsckObjects security Ævar Arnfjörð Bjarmason
2018-07-27 19:45 ` Junio C Hamano
2018-07-28 14:09 ` Ævar Arnfjörð Bjarmason
2018-07-27 14:37 ` [PATCH v3 06/10] transfer.fsckObjects tests: untangle confusing setup Ævar Arnfjörð Bjarmason
2018-07-27 14:37 ` [PATCH v3 07/10] fetch: implement fetch.fsck.* Ævar Arnfjörð Bjarmason
2018-07-27 20:18 ` Junio C Hamano
2018-07-27 21:08 ` Junio C Hamano
2018-07-30 14:58 ` Duy Nguyen
2018-07-30 15:06 ` Ævar Arnfjörð Bjarmason
2018-07-27 14:37 ` [PATCH v3 08/10] fsck: test & document {fetch,receive}.fsck.* config fallback Ævar Arnfjörð Bjarmason
2018-07-27 21:28 ` Junio C Hamano
2018-07-27 14:37 ` [PATCH v3 09/10] fsck: add stress tests for fsck.skipList Ævar Arnfjörð Bjarmason
2018-07-27 14:37 ` [PATCH v3 10/10] fsck: test and document unknown fsck.<msg-id> values Ævar Arnfjörð Bjarmason
2018-07-27 19:50 ` Ævar Arnfjörð Bjarmason
2018-07-27 21:43 ` Junio C Hamano [this message]
2018-07-28 13:55 ` Ævar Arnfjörð Bjarmason
2018-07-30 14:47 ` Junio C Hamano
2018-05-25 19:28 ` [PATCH v2 1/5] config doc: don't describe *.fetchObjects twice Ævar Arnfjörð Bjarmason
2018-05-25 21:07 ` Eric Sunshine
2018-05-25 19:28 ` [PATCH v2 2/5] config doc: unify the description of fsck.* and receive.fsck.* Ævar Arnfjörð Bjarmason
2018-05-25 21:16 ` Eric Sunshine
2018-05-28 9:45 ` Junio C Hamano
2018-05-28 16:44 ` Ævar Arnfjörð Bjarmason
2018-05-30 3:05 ` Junio C Hamano
2018-05-30 3:39 ` Junio C Hamano
2018-05-31 7:20 ` Ævar Arnfjörð Bjarmason
2018-06-01 0:11 ` Junio C Hamano
2018-05-25 19:28 ` [PATCH v2 3/5] config doc: elaborate on what transfer.fsckObjects does Ævar Arnfjörð Bjarmason
2018-05-25 21:19 ` Eric Sunshine
2018-05-25 19:28 ` [PATCH v2 4/5] config doc: mention future aspirations for transfer.fsckObjects Ævar Arnfjörð Bjarmason
2018-05-25 20:33 ` Christian Couder
2018-05-25 19:28 ` [PATCH v2 5/5] fetch: implement fetch.fsck.* Ævar Arnfjörð Bjarmason
2018-05-30 3:47 ` Junio C Hamano
2018-05-31 7:23 ` Ævar Arnfjörð Bjarmason
2018-05-28 9:48 ` [PATCH 0/4] fsck: doc fixes & fetch.fsck.* implementation Junio C Hamano
2018-05-24 19:35 ` [PATCH 1/4] config doc: don't describe *.fetchObjects twice Ævar Arnfjörð Bjarmason
2018-05-25 3:18 ` Junio C Hamano
2018-05-24 19:35 ` [PATCH 2/4] config doc: unify the description of fsck.* and receive.fsck.* Ævar Arnfjörð Bjarmason
2018-05-24 19:53 ` Eric Sunshine
2018-05-24 20:12 ` Ævar Arnfjörð Bjarmason
2018-05-24 22:49 ` Eric Sunshine
2018-05-25 2:07 ` Junio C Hamano
2018-05-24 19:35 ` [PATCH 3/4] config doc: elaborate on what transfer.fsckObjects does Ævar Arnfjörð Bjarmason
2018-05-24 20:15 ` Eric Sunshine
2018-05-25 3:22 ` Junio C Hamano
2018-05-31 7:32 ` Ævar Arnfjörð Bjarmason
2018-05-24 19:35 ` [PATCH 4/4] fetch: implement fetch.fsck.* Ævar Arnfjörð Bjarmason
2018-05-25 4:09 ` Junio C Hamano
2018-05-24 17:04 ` BUG: No way to set fsck.<msg-id> when cloning Jeff King
2018-05-24 20:48 ` Thomas Braun
2018-05-25 7:36 ` Ævar Arnfjörð Bjarmason
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=xmqqbmasl5hq.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.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 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).