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

Re: [PATCH] connected.c: reprepare packs for corner cases

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 13, 2020, 01:14 UTC
Message-ID
<xmqq36addpiv.fsf@gitster.c.googlers.com>
In-Reply-To
<7378a863-7e2a-455e-4635-e07938ef3381@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 5 quoted lines
> I wonder if we could do something more complicated in the long-term,
> which was recommended to me by Jeff Hostetler: add the pack to the
> packed_git list once we've indexed it. That way, we don't reprepare
> and scan the packs one-by-one, but instead we insert to the list
> a single pack that we already know about.

Yup, that was the first thing that came to my mind, i.e. the code that installs a new packfile on disk in our repository must be ours, so we should be able to tell that code to add the new packfile to the in-core list without having to scan.

We may still need to scan when that strategy "fails" to protect against racing with simultaneous repacking, though.

Previous: Derrick StoleeNext: Jeff King
Message 8 of 12 in “connected.c: reprepare packs for corner cases”
  1. connected.c: reprepare packs for corner casesDerrick Stolee via GitGitGadget, Mar 12, 2020
  2. Jonathan TanMar 12, 2020
  3. Derrick StoleeMar 12, 2020
  4. Junio C HamanoMar 12, 2020
  5. Jeff KingMar 12, 2020
  6. Jeff KingMar 12, 2020
  7. Derrick StoleeMar 13, 2020
  8. Junio C HamanoMar 13, 2020
  9. Jeff KingMar 13, 2020
  10. Jeff KingMar 13, 2020
  11. Derrick StoleeMar 13, 2020
  12. connected.c: reprepare packs for corner casesDerrick Stolee via GitGitGadget, Mar 13, 2020

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.