diff mbox series

[01/10] fetch tests: remove redundant test_unconfig()

Message ID patch-01.10-6236f4475fc-20220621T222854Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series t5510: fix the quoting mess | expand

Commit Message

Ævar Arnfjörð Bjarmason June 21, 2022, 10:34 p.m. UTC
The test_unconfig() calls here were added as boilerplate in
737c5a9cde7 (fetch: make --prune configurable, 2013-07-13), and then
faithfully reproduced in e249ce0ccdb (fetch tests: add scaffolding for
the new fetch.pruneTags, 2018-02-09). But they were never necessary,
so let's remove them.

This actually improves our test coverage, as we'll now be asserting
that whatever configuration we leave here (in the "one" block below)
won't affect this particular "git fetch" command.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t5510-fetch.sh | 4 ----
 1 file changed, 4 deletions(-)

Comments

Junio C Hamano June 22, 2022, 5:52 a.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> The test_unconfig() calls here were added as boilerplate in
> 737c5a9cde7 (fetch: make --prune configurable, 2013-07-13), and then
> faithfully reproduced in e249ce0ccdb (fetch tests: add scaffolding for
> the new fetch.pruneTags, 2018-02-09). But they were never necessary,

unnecessary because ...?

is it because nothing has happened in this directory before?

is it because these will all be overriden by the command line
options?

is it because of something else?

> so let's remove them.


> This actually improves our test coverage, as we'll now be asserting
> that whatever configuration we leave here (in the "one" block below)
> won't affect this particular "git fetch" command.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  t/t5510-fetch.sh | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
> index 4620f0ca7fa..d784a761ba0 100755
> --- a/t/t5510-fetch.sh
> +++ b/t/t5510-fetch.sh
> @@ -874,10 +874,6 @@ test_configured_prune_type () {
>  		git tag -f newtag &&
>  		(
>  			cd one &&
> -			test_unconfig fetch.prune &&
> -			test_unconfig fetch.pruneTags &&
> -			test_unconfig remote.origin.prune &&
> -			test_unconfig remote.origin.pruneTags &&
>  			git fetch '"$cmdline_setup"' &&
>  			git rev-parse --verify refs/remotes/origin/newbranch &&
>  			git rev-parse --verify refs/tags/newtag
diff mbox series

Patch

diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 4620f0ca7fa..d784a761ba0 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -874,10 +874,6 @@  test_configured_prune_type () {
 		git tag -f newtag &&
 		(
 			cd one &&
-			test_unconfig fetch.prune &&
-			test_unconfig fetch.pruneTags &&
-			test_unconfig remote.origin.prune &&
-			test_unconfig remote.origin.pruneTags &&
 			git fetch '"$cmdline_setup"' &&
 			git rev-parse --verify refs/remotes/origin/newbranch &&
 			git rev-parse --verify refs/tags/newtag