mirror of
https://github.com/git/git.git
synced 2024-12-03 06:53:53 +08:00
fsck: test & document {fetch,receive}.fsck.* config fallback
Test and document that the {fetch,receive}.fsck.* family of variables doesn't fall back on the corresponding .fsck.* variables. This was alluded to in the existing documentation by saying that "receive" looks at receive.fsck.* and "fsck" looks at fsck.* etc., but it wasn't explicitly stated that there was no fallback, and if you'd e.g. like to configure the skipList you need to do that for all three. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1362df0d41
commit
d786da1cd9
@ -1619,6 +1619,12 @@ The rest of the documentation discusses `fsck.*` for brevity, but the
|
||||
same applies for the corresponding `receive.fsck.*` and
|
||||
`fetch.<msg-id>.*`. variables.
|
||||
+
|
||||
Unlike variables like `color.ui` and `core.editor` the
|
||||
`receive.fsck.<msg-id>` and `fetch.fsck.<msg-id>` variables will not
|
||||
fall back on the `fsck.<msg-id>` configuration if they aren't set. To
|
||||
uniformly configure the same fsck settings in different circumstances
|
||||
all three of them they must all set to the same values.
|
||||
+
|
||||
When `fsck.<msg-id>` is set, errors can be switched to warnings and
|
||||
vice versa by configuring the `fsck.<msg-id>` setting where the
|
||||
`<msg-id>` is the fsck message ID and the value is one of `error`,
|
||||
@ -1642,6 +1648,12 @@ fsck.skipList::
|
||||
+
|
||||
Like `fsck.<msg-id>` this variable has corresponding
|
||||
`receive.fsck.skipList` and `fetch.fsck.skipList` variants.
|
||||
+
|
||||
Unlike variables like `color.ui` and `core.editor` the
|
||||
`receive.fsck.skipList` and `fetch.fsck.skipList` variables will not
|
||||
fall back on the `fsck.skipList` configuration if they aren't set. To
|
||||
uniformly configure the same fsck settings in different circumstances
|
||||
all three of them they must all set to the same values.
|
||||
|
||||
gc.aggressiveDepth::
|
||||
The depth parameter used in the delta compression
|
||||
|
@ -140,8 +140,13 @@ test_expect_success 'push with receive.fsck.skipList' '
|
||||
git init dst &&
|
||||
git --git-dir=dst/.git config receive.fsckObjects true &&
|
||||
test_must_fail git push --porcelain dst bogus &&
|
||||
git --git-dir=dst/.git config receive.fsck.skipList SKIP &&
|
||||
echo $commit >dst/.git/SKIP &&
|
||||
|
||||
# receive.fsck.* does not fall back on fsck.*
|
||||
git --git-dir=dst/.git config fsck.skipList SKIP &&
|
||||
test_must_fail git push --porcelain dst bogus &&
|
||||
|
||||
git --git-dir=dst/.git config receive.fsck.skipList SKIP &&
|
||||
git push --porcelain dst bogus
|
||||
'
|
||||
|
||||
@ -153,8 +158,15 @@ test_expect_success 'fetch with fetch.fsck.skipList' '
|
||||
git init dst &&
|
||||
git --git-dir=dst/.git config fetch.fsckObjects true &&
|
||||
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
|
||||
git --git-dir=dst/.git config fetch.fsck.skipList dst/.git/SKIP &&
|
||||
git --git-dir=dst/.git config fetch.fsck.skipList /dev/null &&
|
||||
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
|
||||
echo $commit >dst/.git/SKIP &&
|
||||
|
||||
# fetch.fsck.* does not fall back on fsck.*
|
||||
git --git-dir=dst/.git config fsck.skipList dst/.git/SKIP &&
|
||||
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
|
||||
|
||||
git --git-dir=dst/.git config fetch.fsck.skipList dst/.git/SKIP &&
|
||||
git --git-dir=dst/.git fetch "file://$(pwd)" $refspec
|
||||
'
|
||||
|
||||
@ -166,6 +178,11 @@ test_expect_success 'push with receive.fsck.missingEmail=warn' '
|
||||
git init dst &&
|
||||
git --git-dir=dst/.git config receive.fsckobjects true &&
|
||||
test_must_fail git push --porcelain dst bogus &&
|
||||
|
||||
# receive.fsck.<msg-id> does not fall back on fsck.<msg-id>
|
||||
git --git-dir=dst/.git config fsck.missingEmail warn &&
|
||||
test_must_fail git push --porcelain dst bogus &&
|
||||
|
||||
git --git-dir=dst/.git config \
|
||||
receive.fsck.missingEmail warn &&
|
||||
git push --porcelain dst bogus >act 2>&1 &&
|
||||
@ -185,6 +202,11 @@ test_expect_success 'fetch with fetch.fsck.missingEmail=warn' '
|
||||
git init dst &&
|
||||
git --git-dir=dst/.git config fetch.fsckobjects true &&
|
||||
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
|
||||
|
||||
# fetch.fsck.<msg-id> does not fall back on fsck.<msg-id>
|
||||
git --git-dir=dst/.git config fsck.missingEmail warn &&
|
||||
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
|
||||
|
||||
git --git-dir=dst/.git config \
|
||||
fetch.fsck.missingEmail warn &&
|
||||
git --git-dir=dst/.git fetch "file://$(pwd)" $refspec >act 2>&1 &&
|
||||
|
Loading…
Reference in New Issue
Block a user