maintenance: stop writing log.excludeDecoration
This reverts commit 96eaffebbf3d0 (maintenance: set log.excludeDecoration durin prefetch, 2021-01-19). The previous change created a default decoration filter that does not include refs/prefetch/, so this modification of the config is no longer needed. One issue that can happen from this point on is that users who ran the prefetch task on previous versions of Git will still have a log.excludeDecoration value and that will prevent the new default decoration filter from being active. Thus, when we add the refs/bundle/ namespace as part of the bundle URI feature, those users will see refs/bundle/ decorations. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Derrick Stolee committed
Aug 5, 2022 at 17:58 UTC
863a8ae97b7b5b112b928f2fab8185bb7574e7b3
2 files changed
-27
builtin/gc.c
-6
@@ -904,12 +904,6 @@ static int fetch_remote(struct remote *remote, void *cbdata)
904
905
static int maintenance_task_prefetch(struct maintenance_run_opts *opts)
906
{
907
- git_config_set_multivar_gently("log.excludedecoration",
908
- "refs/prefetch/",
909
- "refs/prefetch/",
910
- CONFIG_FLAGS_FIXED_VALUE |
911
- CONFIG_FLAGS_MULTI_REPLACE);
912
-
907
if (for_each_remote(fetch_remote, opts)) {
908
error(_("failed to prefetch remotes"));
909
return 1;
t/t7900-maintenance.sh
-21
@@ -162,7 +162,6 @@ test_expect_success 'prefetch multiple remotes' '
162
test_cmp_rev refs/remotes/remote1/one refs/prefetch/remotes/remote1/one &&
163
test_cmp_rev refs/remotes/remote2/two refs/prefetch/remotes/remote2/two &&
164
165
- test_cmp_config refs/prefetch/ log.excludedecoration &&
165
git log --oneline --decorate --all >log &&
166
! grep "prefetch" log &&
167
@@ -173,26 +172,6 @@ test_expect_success 'prefetch multiple remotes' '
172
test_subcommand git fetch remote2 $fetchargs <skip-remote1.txt
173
'
174
176
-test_expect_success 'prefetch and existing log.excludeDecoration values' '
177
- git config --unset-all log.excludeDecoration &&
178
- git config log.excludeDecoration refs/remotes/remote1/ &&
179
- git maintenance run --task=prefetch &&
180
-
181
- git config --get-all log.excludeDecoration >out &&
182
- grep refs/remotes/remote1/ out &&
183
- grep refs/prefetch/ out &&
184
-
185
- git log --oneline --decorate --all >log &&
186
- ! grep "prefetch" log &&
187
- ! grep "remote1" log &&
188
- grep "remote2" log &&
189
-
190
- # a second run does not change the config
191
- git maintenance run --task=prefetch &&
192
- git log --oneline --decorate --all >log2 &&
193
- test_cmp log log2
194
-'
195
-
175
test_expect_success 'loose-objects task' '
176
# Repack everything so we know the state of the object dir
177
git repack -adk &&