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

Feature request: secondary index by path fragment

From
Robin H. Johnson <robbat2@gentoo.org>
Date
May 6, 2024, 23:11 UTC
Message-ID
<robbat2-20240506T225759-090424131Z@orbis-terrarum.net>

Maybe this already happens in the code, but if not, please consider it as a feature request.

Gentoo has some tooling that boils down to repeated runs of 'git log -- somepath/' via cgit as well as other shell tooling.

If the path is relatively deep for the tree (e.g. to a specific file or sub-directory), the size of history [1] makes that a very slow operation to go all the way back to the initial repo commit: ~12 seconds per operation on fast hardware, ~45 seconds on slower harder - even with the packs cached.

I was wondering if Git could gain a secondary index of commits, based on path prefixes, that would speed up the 'git log' run.

It would need to be fast to append to the secondary index, because Gentoo gets a steady flow of commits 24/7.

[1] 825k+ commits based on GitHub stats.
-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136
Next: Junio C Hamano
Message 1 of 4 in “Feature request: secondary index by path fragment”
  1. Robin H. JohnsonMay 6, 2024
  2. Junio C HamanoMay 6, 2024
  3. Patrick SteinhardtMay 7, 2024
  4. Robin H. JohnsonMay 7, 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.