mbox series

[v2,0/2] Two cleanups around 'prefetch' refs

Message ID pull.838.v2.git.1611060724.gitgitgadget@gmail.com (mailing list archive)
Headers show
Series Two cleanups around 'prefetch' refs | expand

Message

Philippe Blain via GitGitGadget Jan. 19, 2021, 12:52 p.m. UTC
Here are a couple things that caught my eye during a recent evaluation of
the maintenance feature:

 1. 'refs/prefetch/' refs show up in 'git log' decorations. Auto-hide these.
 2. t7900-maintenance.sh had some scary warnings that end up being
    unimportant.

This is based on 'master' at 66e871b (The third batch, 2021-01-15).

Update in v2: deleting refs more safely for alternate ref backends. (Thanks,
Taylor!)

Thanks, -Stolee

Derrick Stolee (2):
  maintenance: set log.excludeDecoration durin prefetch
  t7900: clean up some broken refs

 builtin/gc.c           |  6 ++++++
 t/t7900-maintenance.sh | 33 ++++++++++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)


base-commit: 66e871b6647ffea61a77a0f82c7ef3415f1ee79c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-838%2Fderrickstolee%2Fprefetch-refs-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-838/derrickstolee/prefetch-refs-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/838

Range-diff vs v1:

 1:  5b2ce9049a6 = 1:  5b2ce9049a6 maintenance: set log.excludeDecoration durin prefetch
 2:  616b73a6556 ! 2:  35038dfd037 t7900: clean up some broken refs
     @@ Commit message
      
          All that is left is to clean up the tests in t7900-maintenance.sh to
          remove these tags and refs that are not being repacked for the
     -    incremental-repack tests.
     +    incremental-repack tests. Use update-ref to ensure this works with all
     +    ref backends.
      
     +    Helped-by: Taylor Blau <me@ttaylorr.com>
          Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
      
       ## t/t7900-maintenance.sh ##
     @@ t/t7900-maintenance.sh: test_expect_success 'incremental-repack task' '
       	^HEAD~1
       	EOF
      +
     ++	# Delete refs that have not been repacked in these packs.
     ++	git for-each-ref --format="delete %(refname)" \
     ++		refs/prefetch refs/tags >refs &&
     ++	git update-ref --stdin <refs &&
     ++
      +	# Replace the object directory with this pack layout.
     -+	# However, it does not include all objects from the remotes.
     -+	rm -rf .git/refs/prefetch &&
     -+	rm -rf .git/refs/tags &&
       	rm -f $packDir/pack-* &&
       	rm -f $packDir/loose-* &&
       	ls $packDir/*.pack >packs-before &&

Comments

Taylor Blau Jan. 19, 2021, 2:24 p.m. UTC | #1
On Tue, Jan 19, 2021 at 12:52:02PM +0000, Derrick Stolee via GitGitGadget wrote:
> Update in v2: deleting refs more safely for alternate ref backends. (Thanks,
> Taylor!)

The range-diff looks good to me, thanks!

  Reviewed-by: Taylor Blau <me@ttaylorr.com>

Thanks,
Taylor
Junio C Hamano Jan. 21, 2021, 2:45 a.m. UTC | #2
Taylor Blau <me@ttaylorr.com> writes:

> On Tue, Jan 19, 2021 at 12:52:02PM +0000, Derrick Stolee via GitGitGadget wrote:
>> Update in v2: deleting refs more safely for alternate ref backends. (Thanks,
>> Taylor!)
>
> The range-diff looks good to me, thanks!
>
>   Reviewed-by: Taylor Blau <me@ttaylorr.com>

Thanks, both.