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

Re: What's cooking in git.git (Jan 2024, #01; Tue, 2)

From
Jeff King <peff@peff.net>
Date
Jan 5, 2024, 08:59 UTC
Message-ID
<20240105085928.GA3078702@coredump.intra.peff.net>
In-Reply-To
<xmqq8r56bcew.fsf@gitster.g>
On Wed, Jan 03, 2024 at 08:37:59AM -0800, Junio C Hamano wrote:
Show 12 quoted lines
> This is totally unrelated tangent, but the way "show-index" gets
> invoked in the above loop makes readers wonder how the caller found
> out which $idx file to read.
> 
> Of course, the above loop sits downstream of a pipe
> 
>     find .git/objects/pack -type f -name \*.idx
> 
> which means that any user of "git show-index" must be intimately
> familiar with how the object database is structured.  I wonder if we
> want an extra layer of abstraction, similar to how the reference
> database can have different backend implementation.
I assume you mean a test helper by "extra layer of abstraction".

That could make sense, though I think this is just the tip of the iceberg. There are a bazillion tests that muck with .git/objects/ directly (especially ones finding and munging loose objects). So it wouldn't do much good until we know what cases the abstract code would have to handle. And I don't think we have any concrete alternative yet to the current object-dir layout.

So I think we should just punt on it for now. Adding one case here is not making a hypothetical abstraction layer significantly harder to add later.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 20 in “What's cooking in git.git (Jan 2024, #01; Tue, 2)”
  1. Junio C HamanoJan 3, 2024
  2. Patrick SteinhardtJan 3, 2024
  3. Jeff KingJan 3, 2024
  4. Junio C HamanoJan 3, 2024
  5. Jeff KingJan 5, 2024
  6. Junio C HamanoJan 5, 2024
  7. René ScharfeJan 3, 2024
  8. Taylor BlauJan 3, 2024
  9. Junio C HamanoJan 3, 2024
  10. SZEDER GáborJan 13, 2024
  11. Taylor BlauJan 13, 2024
  12. SZEDER GáborJan 13, 2024
  13. Taylor BlauJan 16, 2024
  14. SZEDER GáborFeb 25, 2024
  15. Taylor BlauFeb 26, 2024
  16. SZEDER GáborJan 13, 2024
  17. Taylor BlauJan 16, 2024
  18. Junio C HamanoJan 16, 2024
  19. Taylor BlauJan 16, 2024
  20. Junio C HamanoJan 16, 2024

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.