git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
Jan 19, 2021, 12:52 UTC
Message-ID
<pull.838.v2.git.1611060724.gitgitgadget@gmail.com>
In-Reply-To
<pull.838.git.1610940216.gitgitgadget@gmail.com>

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 &&
-- 
gitgitgadget
Previous: Derrick StoleeNext: Derrick Stolee via GitGitGadget
Message 7 of 13 in “Two cleanups around 'prefetch' refs”
  1. 0/2 Two cleanups around 'prefetch' refsDerrick Stolee via GitGitGadget, Jan 18, 2021
  2. 1/2 maintenance: set log.excludeDecoration durin prefetchDerrick Stolee via GitGitGadget, Jan 18, 2021
  3. Taylor BlauJan 18, 2021
  4. 2/2 t7900: clean up some broken refsDerrick Stolee via GitGitGadget, Jan 18, 2021
  5. Taylor BlauJan 18, 2021
  6. Derrick StoleeJan 18, 2021
  7. 0/2 Two cleanups around 'prefetch' refsDerrick Stolee via GitGitGadget, Jan 19, 2021
  8. 1/2 maintenance: set log.excludeDecoration durin prefetchDerrick Stolee via GitGitGadget, Jan 19, 2021
  9. Junio C HamanoJan 21, 2021
  10. 2/2 t7900: clean up some broken refsDerrick Stolee via GitGitGadget, Jan 19, 2021
  11. Junio C HamanoJan 21, 2021
  12. Taylor BlauJan 19, 2021
  13. Junio C HamanoJan 21, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.