From: Derrick Stolee <stolee@gmail.com>
To: Taylor Blau <me@ttaylorr.com>,
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, newren@gmail.com, delphij@google.com,
peff@peff.net, Derrick Stolee <derrickstolee@github.com>,
Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH] setup: warn if extensions exist on old format
Date: Mon, 13 Jul 2020 15:41:20 -0400 [thread overview]
Message-ID: <95c338d0-dbf0-669d-59a3-8c2d6c87c8fc@gmail.com> (raw)
In-Reply-To: <20200713193405.GC77607@syl.lan>
On 7/13/2020 3:34 PM, Taylor Blau wrote:
> s/upgrae/upgrade
> s/ocnfigured/configured
Oh man, what was going on with me when I was typing this message.
Thanks for the thorough inspection.
>> diff --git a/setup.c b/setup.c
>> index eb066db6d8..6ff6c54d39 100644
>> --- a/setup.c
>> +++ b/setup.c
>> @@ -542,6 +542,11 @@ static int check_repository_format_gently(const char *gitdir, struct repository_
>> }
>> }
>>
>> + if (candidate->version == 0 && candidate->has_extensions) {
>> + warning(_("some extensions are enabled, but core.repositoryFormatVersion=0"));
>> + warning(_("if you intended to use extensions, run 'git config core.repositoryFormatVersion 1'"));
>> + }
>> +
>> return 0;
>> }
>>
>> diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
>> index 88cdde255c..d249428f44 100755
>> --- a/t/t1091-sparse-checkout-builtin.sh
>> +++ b/t/t1091-sparse-checkout-builtin.sh
>> @@ -68,6 +68,15 @@ test_expect_success 'git sparse-checkout init' '
>> check_files repo a
>> '
>>
>> +test_expect_success 'warning about core.repositoryFormatVersion' '
>> + test_when_finished git -C repo config core.repositoryFormatVersion 1 &&
>> + git -C repo status 2>err &&
>> + test_must_be_empty err &&
>> + git -C repo config --local core.repositoryFormatVersion 0 &&
>
> I don't think it's that difficult to see that this patch is correct, but
> it might be worth testing this for the case that
> 'core.repositoryFormatVersion' is unset, too.
You were absolutely right to check this, since this diff causes
the test to fail:
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
index d249428f44..b5de141292 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -74,6 +74,9 @@ test_expect_success 'warning about core.repositoryFormatVersion' '
test_must_be_empty err &&
git -C repo config --local core.repositoryFormatVersion 0 &&
git -C repo status 2>err &&
+ test_i18ngrep "some extensions are enabled, but core.repositoryFormatVersion=0" err &&
+ git -C repo config --local --unset core.repositoryFormatVersion 0 &&
+ git -C repo status 2>err &&
test_i18ngrep "some extensions are enabled, but core.repositoryFormatVersion=0" err
'
I'll investigate why the "unset" case is different than the "0" case.
Hopefully the "should we do this?" question can continue being discussed
while I work on a v2.
Thanks,
-Stolee
next prev parent reply other threads:[~2020-07-13 19:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 19:20 [PATCH] setup: warn if extensions exist on old format Derrick Stolee via GitGitGadget
2020-07-13 19:34 ` Taylor Blau
2020-07-13 19:41 ` Derrick Stolee [this message]
2020-07-13 19:36 ` Junio C Hamano
2020-07-13 20:00 ` Junio C Hamano
2020-07-13 20:18 ` [PATCH] setup: tweak upgrade policy to grandfather worktreeconfig Junio C Hamano
2020-07-13 20:46 ` Derrick Stolee
2020-07-13 21:45 ` Junio C Hamano
2020-07-14 4:06 ` Jonathan Nieder
2020-07-14 4:27 ` Junio C Hamano
2020-07-14 1:26 ` [PATCH v2 0/2] setup: warn if extensions exist on old format Derrick Stolee via GitGitGadget
2020-07-14 1:26 ` [PATCH v2 1/2] setup: tweak upgrade policy to grandfather worktreeconfig Derrick Stolee via GitGitGadget
2020-07-14 20:22 ` Johannes Schindelin
2020-07-14 1:26 ` [PATCH v2 2/2] config: provide extra detail about worktree config Derrick Stolee via GitGitGadget
2020-07-14 20:24 ` [PATCH v2 0/2] setup: warn if extensions exist on old format Johannes Schindelin
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=95c338d0-dbf0-669d-59a3-8c2d6c87c8fc@gmail.com \
--to=stolee@gmail.com \
--cc=delphij@google.com \
--cc=derrickstolee@github.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=me@ttaylorr.com \
--cc=newren@gmail.com \
--cc=peff@peff.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).