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

Re: [PATCH] fetch-pack: write fetched refs to .promisor

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 27, 2019, 20:27 UTC
Message-ID
<xmqqmufu2w25.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190826214737.164132-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
> As written in the NEEDSWORK comment, repack does not preserve the
> contents of .promisor files, but I thought I'd send this out anyway as
> this change is already useful for users who don't run repack much.

What do you exactly mean by "much" here? The comment sounds like it is saying "running this code once and you'd make the commits and objects that were depending on the existing promisor invalid", in which case it would be more like "it is already useful for users until they run their first repack that destroyes their repository", but certainly that is not what we want to do, so...

Show 11 quoted lines
> +test_expect_success 'verify that .promisor file contains refs fetched' '
> +	ls pc1/.git/objects/pack/pack-*.promisor >promisorlist &&
> +	test_line_count = 1 promisorlist &&
> +	git -C srv.bare rev-list HEAD >headhash &&
> +	grep "$(cat headhash) HEAD" $(cat promisorlist) &&
> +	grep "$(cat headhash) refs/heads/master" $(cat promisorlist)
> +'
> +
>  # checkout master to force dynamic object fetch of blobs at HEAD.
>  test_expect_success 'verify checkout with dynamic object fetch' '
>  	git -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&
Previous: Jonathan TanNext: Jonathan Tan
Message 2 of 12 in “fetch-pack: write fetched refs to .promisor”
  1. fetch-pack: write fetched refs to .promisorJonathan Tan, Aug 26, 2019
  2. Junio C HamanoAug 27, 2019
  3. Jonathan TanAug 27, 2019
  4. Jeff KingSep 5, 2019
  5. Junio C HamanoSep 5, 2019
  6. Jeff KingSep 5, 2019
  7. Jonathan TanSep 5, 2019
  8. Jeff KingOct 2, 2019
  9. Josh SteadmonOct 14, 2019
  10. Jonathan TanOct 14, 2019
  11. fetch-pack: write fetched refs to .promisorJonathan Tan, Oct 15, 2019
  12. Josh SteadmonOct 15, 2019

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.