Skip to content

Commit 863a8ae

Browse files
derrickstoleegitster
authored andcommitted
maintenance: stop writing log.excludeDecoration
This reverts commit 96eaffe (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3e103ed commit 863a8ae

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

builtin/gc.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -904,12 +904,6 @@ static int fetch_remote(struct remote *remote, void *cbdata)
904904

905905
static int maintenance_task_prefetch(struct maintenance_run_opts *opts)
906906
{
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-
913907
if (for_each_remote(fetch_remote, opts)) {
914908
error(_("failed to prefetch remotes"));
915909
return 1;

t/t7900-maintenance.sh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ test_expect_success 'prefetch multiple remotes' '
162162
test_cmp_rev refs/remotes/remote1/one refs/prefetch/remotes/remote1/one &&
163163
test_cmp_rev refs/remotes/remote2/two refs/prefetch/remotes/remote2/two &&
164164
165-
test_cmp_config refs/prefetch/ log.excludedecoration &&
166165
git log --oneline --decorate --all >log &&
167166
! grep "prefetch" log &&
168167
@@ -173,26 +172,6 @@ test_expect_success 'prefetch multiple remotes' '
173172
test_subcommand git fetch remote2 $fetchargs <skip-remote1.txt
174173
'
175174

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-
196175
test_expect_success 'loose-objects task' '
197176
# Repack everything so we know the state of the object dir
198177
git repack -adk &&

0 commit comments

Comments
 (0)