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

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

From
Josh Steadmon <steadmon@google.com>
Date
Oct 15, 2019, 19:40 UTC
Message-ID
<20191015194019.GC233821@google.com>
In-Reply-To
<20191015001231.97272-1-jonathantanmy@google.com>
On 2019.10.14 17:12, Jonathan Tan wrote:
Show 27 quoted lines
> The specification of promisor packfiles (in partial-clone.txt) states
> that the .promisor files that accompany packfiles do not matter (just
> like .keep files), so whenever a packfile is fetched from the promisor
> remote, Git has been writing empty .promisor files. But these files
> could contain more useful information.
> 
> So instead of writing empty files, write the refs fetched to these
> files. This makes it easier to debug issues with partial clones, as we
> can identify what refs (and their associated hashes) were fetched at the
> time the packfile was downloaded, and if necessary, compare those hashes
> against what the promisor remote reports now.
> 
> This is implemented by teaching fetch-pack to write its own non-empty
> .promisor file whenever it knows the name of the pack's lockfile. This
> covers the case wherein the user runs "git fetch" with an internal
> protocol or HTTP protocol v2 (fetch_refs_via_pack() in transport.c sets
> lock_pack) and with HTTP protocol v0/v1 (fetch_git() in remote-curl.c
> passes "--lock-pack" to "fetch-pack").
> 
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
> Changes from v1:
>  - commit message explains scope of change ("it knows the name of the
>    pack's lockfile)
>  - explained what .promisor contains in comment in builtin/repack.c
>  - moved .promisor writing until after we know that index-pack succeeded
> ---
Thanks, this looks good to me.
Previous: Jonathan Tan
Message 12 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.