summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2024-12-05 13:21:58 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-06 03:24:21 +0100
commit6c397d01046251b4d26f2aded07a695ada196962 (patch)
treef8caddcf8416a82ebcf48c806bfca0a5caf752e3 /t
parentGit 2.46.2 (diff)
downloadgit-6c397d01046251b4d26f2aded07a695ada196962.tar.xz
git-6c397d01046251b4d26f2aded07a695ada196962.zip
advice: suggest using subcommand "git config set"
The advice message currently suggests using "git config advice..." to disable advice messages, but since 00bbdde141 (builtin/config: introduce "set" subcommand, 2024-05-06) we have the "set" subcommand for config. Since using the subcommand is more in-line with the modern interface, any advice should be promoting its usage. Change the disable advice message to use the subcommand instead. Change all uses of "git config advice" in the tests to use the subcommand. Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0018-advice.sh2
-rwxr-xr-xt/t3200-branch.sh2
-rwxr-xr-xt/t3404-rebase-interactive.sh6
-rwxr-xr-xt/t3501-revert-cherry-pick.sh2
-rwxr-xr-xt/t3507-cherry-pick-conflict.sh6
-rwxr-xr-xt/t3510-cherry-pick-sequence.sh2
-rwxr-xr-xt/t3511-cherry-pick-x.sh2
-rwxr-xr-xt/t3602-rm-sparse-checkout.sh2
-rwxr-xr-xt/t3700-add.sh6
-rwxr-xr-xt/t3705-add-sparse-checkout.sh2
-rwxr-xr-xt/t7002-mv-sparse-checkout.sh4
-rwxr-xr-xt/t7004-tag.sh2
-rwxr-xr-xt/t7201-co.sh4
-rwxr-xr-xt/t7400-submodule-basic.sh2
-rwxr-xr-xt/t7508-status.sh2
15 files changed, 23 insertions, 23 deletions
diff --git a/t/t0018-advice.sh b/t/t0018-advice.sh
index fac52322a7..4334766e6d 100755
--- a/t/t0018-advice.sh
+++ b/t/t0018-advice.sh
@@ -11,7 +11,7 @@ TEST_PASSES_SANITIZE_LEAK=true
test_expect_success 'advice should be printed when config variable is unset' '
cat >expect <<-\EOF &&
hint: This is a piece of advice
- hint: Disable this message with "git config advice.nestedTag false"
+ hint: Disable this message with "git config set advice.nestedTag false"
EOF
test-tool advise "This is a piece of advice" 2>actual &&
test_cmp expect actual
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index ccfa6a720d..a2e9ce03a5 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -1697,7 +1697,7 @@ test_expect_success 'errors if given a bad branch name' '
cat <<-\EOF >expect &&
fatal: '\''foo..bar'\'' is not a valid branch name
hint: See `man git check-ref-format`
- hint: Disable this message with "git config advice.refSyntax false"
+ hint: Disable this message with "git config set advice.refSyntax false"
EOF
test_must_fail git branch foo..bar >actual 2>&1 &&
test_cmp expect actual
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index f92baad138..6c077f9e9b 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -2235,20 +2235,20 @@ test_expect_success 'non-merge commands reject merge commits' '
error: ${SQ}pick${SQ} does not accept merge commits
hint: ${SQ}pick${SQ} does not take a merge commit. If you wanted to
hint: replay the merge, use ${SQ}merge -C${SQ} on the commit.
- hint: Disable this message with "git config advice.rebaseTodoError false"
+ hint: Disable this message with "git config set advice.rebaseTodoError false"
error: invalid line 1: pick $oid
error: ${SQ}reword${SQ} does not accept merge commits
hint: ${SQ}reword${SQ} does not take a merge commit. If you wanted to
hint: replay the merge and reword the commit message, use
hint: ${SQ}merge -c${SQ} on the commit
- hint: Disable this message with "git config advice.rebaseTodoError false"
+ hint: Disable this message with "git config set advice.rebaseTodoError false"
error: invalid line 2: reword $oid
error: ${SQ}edit${SQ} does not accept merge commits
hint: ${SQ}edit${SQ} does not take a merge commit. If you wanted to
hint: replay the merge, use ${SQ}merge -C${SQ} on the commit, and then
hint: ${SQ}break${SQ} to give the control back to you so that you can
hint: do ${SQ}git commit --amend && git rebase --continue${SQ}.
- hint: Disable this message with "git config advice.rebaseTodoError false"
+ hint: Disable this message with "git config set advice.rebaseTodoError false"
error: invalid line 3: edit $oid
error: cannot squash merge commit into another commit
error: invalid line 4: fixup $oid
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index 411027fb58..6e829f13bf 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -178,7 +178,7 @@ test_expect_success 'advice from failed revert' '
hint: You can instead skip this commit with "git revert --skip".
hint: To abort and get back to the state before "git revert",
hint: run "git revert --abort".
- hint: Disable this message with "git config advice.mergeConflict false"
+ hint: Disable this message with "git config set advice.mergeConflict false"
EOF
test_commit --append --no-tag "double-add dream" dream dream &&
test_must_fail git revert HEAD^ 2>actual &&
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index f3947b400a..44596cb1e8 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -34,7 +34,7 @@ test_expect_success setup '
git commit --allow-empty --allow-empty-message &&
git tag empty &&
git checkout main &&
- git config advice.detachedhead false
+ git config set advice.detachedhead false
'
@@ -60,7 +60,7 @@ test_expect_success 'advice from failed cherry-pick' '
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
- hint: Disable this message with "git config advice.mergeConflict false"
+ hint: Disable this message with "git config set advice.mergeConflict false"
EOF
test_must_fail git cherry-pick picked 2>actual &&
@@ -75,7 +75,7 @@ test_expect_success 'advice from failed cherry-pick --no-commit' "
error: could not apply \$picked... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
- hint: Disable this message with \"git config advice.mergeConflict false\"
+ hint: Disable this message with \"git config set advice.mergeConflict false\"
EOF
test_must_fail git cherry-pick --no-commit picked 2>actual &&
diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh
index 7eb52b12ed..66ff9db270 100755
--- a/t/t3510-cherry-pick-sequence.sh
+++ b/t/t3510-cherry-pick-sequence.sh
@@ -25,7 +25,7 @@ pristine_detach () {
}
test_expect_success setup '
- git config advice.detachedhead false &&
+ git config set advice.detachedhead false &&
echo unrelated >unrelated &&
git add unrelated &&
test_commit initial foo a &&
diff --git a/t/t3511-cherry-pick-x.sh b/t/t3511-cherry-pick-x.sh
index dd5d92ef30..dff0b2df9e 100755
--- a/t/t3511-cherry-pick-x.sh
+++ b/t/t3511-cherry-pick-x.sh
@@ -52,7 +52,7 @@ trailing empty lines
"
test_expect_success setup '
- git config advice.detachedhead false &&
+ git config set advice.detachedhead false &&
echo unrelated >unrelated &&
git add unrelated &&
test_commit initial foo a &&
diff --git a/t/t3602-rm-sparse-checkout.sh b/t/t3602-rm-sparse-checkout.sh
index fcdefba48c..bab3b1c85d 100755
--- a/t/t3602-rm-sparse-checkout.sh
+++ b/t/t3602-rm-sparse-checkout.sh
@@ -21,7 +21,7 @@ test_expect_success 'setup' "
hint: If you intend to update such entries, try one of the following:
hint: * Use the --sparse option.
hint: * Disable or modify the sparsity rules.
- hint: Disable this message with \"git config advice.updateSparsePath false\"
+ hint: Disable this message with \"git config set advice.updateSparsePath false\"
EOF
echo b | cat sparse_error_header - >sparse_entry_b_error &&
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 839c904745..7090ed2ef1 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -32,7 +32,7 @@ test_expect_success 'Test with no pathspecs' '
cat >expect <<-EOF &&
Nothing specified, nothing added.
hint: Maybe you wanted to say ${SQ}git add .${SQ}?
- hint: Disable this message with "git config advice.addEmptyPathspec false"
+ hint: Disable this message with "git config set advice.addEmptyPathspec false"
EOF
git add 2>actual &&
test_cmp expect actual
@@ -376,7 +376,7 @@ test_expect_success '"git add" a embedded repository' '
hint: git rm --cached inner1
hint:
hint: See "git help submodule" for more information.
- hint: Disable this message with "git config advice.addEmbeddedRepo false"
+ hint: Disable this message with "git config set advice.addEmbeddedRepo false"
warning: adding embedded git repository: inner2
EOF
test_cmp expect actual
@@ -414,7 +414,7 @@ cat >expect.err <<\EOF
The following paths are ignored by one of your .gitignore files:
ignored-file
hint: Use -f if you really want to add them.
-hint: Disable this message with "git config advice.addIgnoredFile false"
+hint: Disable this message with "git config set advice.addIgnoredFile false"
EOF
cat >expect.out <<\EOF
add 'track-this'
diff --git a/t/t3705-add-sparse-checkout.sh b/t/t3705-add-sparse-checkout.sh
index 2bade9e804..53a4782267 100755
--- a/t/t3705-add-sparse-checkout.sh
+++ b/t/t3705-add-sparse-checkout.sh
@@ -54,7 +54,7 @@ test_expect_success 'setup' "
hint: If you intend to update such entries, try one of the following:
hint: * Use the --sparse option.
hint: * Disable or modify the sparsity rules.
- hint: Disable this message with \"git config advice.updateSparsePath false\"
+ hint: Disable this message with \"git config set advice.updateSparsePath false\"
EOF
echo sparse_entry | cat sparse_error_header - >sparse_entry_error &&
diff --git a/t/t7002-mv-sparse-checkout.sh b/t/t7002-mv-sparse-checkout.sh
index 57969ce805..5235092c1d 100755
--- a/t/t7002-mv-sparse-checkout.sh
+++ b/t/t7002-mv-sparse-checkout.sh
@@ -33,7 +33,7 @@ test_expect_success 'setup' "
hint: If you intend to update such entries, try one of the following:
hint: * Use the --sparse option.
hint: * Disable or modify the sparsity rules.
- hint: Disable this message with \"git config advice.updateSparsePath false\"
+ hint: Disable this message with \"git config set advice.updateSparsePath false\"
EOF
cat >dirty_error_header <<-EOF &&
@@ -46,7 +46,7 @@ test_expect_success 'setup' "
hint: To correct the sparsity of these paths, do the following:
hint: * Use \"git add --sparse <paths>\" to update the index
hint: * Use \"git sparse-checkout reapply\" to apply the sparsity rules
- hint: Disable this message with \"git config advice.updateSparsePath false\"
+ hint: Disable this message with \"git config set advice.updateSparsePath false\"
EOF
"
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index fa6336edf9..0ff4956869 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1896,7 +1896,7 @@ test_expect_success 'recursive tagging should give advice' '
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f nested annotated-v4.0^{}
- hint: Disable this message with "git config advice.nestedTag false"
+ hint: Disable this message with "git config set advice.nestedTag false"
EOF
git tag -m nested nested annotated-v4.0 2>actual &&
test_cmp expect actual
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 2d984eb4c6..d4cf269431 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -225,7 +225,7 @@ test_expect_success 'switch to another branch while carrying a deletion' '
'
test_expect_success 'checkout to detach HEAD (with advice declined)' '
- git config advice.detachedHead false &&
+ git config set advice.detachedHead false &&
rev=$(git rev-parse --short renamer^) &&
git checkout -f renamer &&
git clean -f &&
@@ -245,7 +245,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
'
test_expect_success 'checkout to detach HEAD' '
- git config advice.detachedHead true &&
+ git config set advice.detachedHead true &&
rev=$(git rev-parse --short renamer^) &&
git checkout -f renamer &&
git clean -f &&
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 981488885f..d6a501d453 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -212,7 +212,7 @@ test_expect_success 'submodule add to .gitignored path fails' '
The following paths are ignored by one of your .gitignore files:
submod
hint: Use -f if you really want to add them.
- hint: Disable this message with "git config advice.addIgnoredFile false"
+ hint: Disable this message with "git config set advice.addIgnoredFile false"
EOF
# Does not use test_commit due to the ignore
echo "*" > .gitignore &&
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 773383fefb..22e310e277 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1700,7 +1700,7 @@ test_expect_success 'setup slow status advice' '
EOF
git add .gitignore &&
git commit -m "Add .gitignore" &&
- git config advice.statusuoption true
+ git config set advice.statusuoption true
)
'