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

Re: [RFC] Reporting index properties

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 6, 2017, 04:02 UTC
Message-ID
<xmqqvajsyldn.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171006031303.GB134987@aiede.mtv.corp.google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 11 quoted lines
> Aside: git-update-index(1) says
>
> 	Version 4 is relatively young (first released in 1.8.0 in
> 	October 2012).
>
> My first reaction is to wonder if it is time to introduce a config
> option to use index format version 4 by default, since after 5 years
> it is not relatively young any more.
>
> My second reaction is to notice that the index.version configuration
> already exists.  Probably git-update-index(1) ought to point to it.
Both good points.
> JGit still doesn't support index format 4, so 4 is still not a good
> default for `index.version` for a user that hasn't explicitly
> configured it, but the moment JGit gains that support I think it will
> be. :)

After reading ce_write_entry(), I tend to agree. v4 is the first one that loses the alignment padding, which made sense back when we mmap(2)ed the index file and read from it directly without the ondisk-vs-incore conversion, but that stopped to be the case several years ago.

I find it interesting to find that the recently proposed design for reftable uses the same "common prefix compression from the previous name" trick, even though index v4 does not have any resync point like reftable does.

Previous: Jonathan Nieder
Message 7 of 7 in “[RFC] Reporting index properties”
  1. Alex VandiverOct 5, 2017
  2. Junio C HamanoOct 6, 2017
  3. Alex VandiverOct 6, 2017
  4. Junio C HamanoOct 6, 2017
  5. Alex VandiverOct 6, 2017
  6. Jonathan NiederOct 6, 2017
  7. Junio C HamanoOct 6, 2017

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.