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

Re: [PATCH 1/1] read-cache: update index format default to v4

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Sep 24, 2018, 21:32 UTC
Message-ID
<20180924213223.GG27036@localhost>
In-Reply-To
<56374128136fe9377503d446daf98e67847194aa.1537823728.git.gitgitgadget@gmail.com>
On Mon, Sep 24, 2018 at 02:15:30PM -0700, Derrick Stolee via GitGitGadget wrote:
Show 7 quoted lines
> From: Derrick Stolee <dstolee@microsoft.com>
> 
> The index v4 format has been available since 2012 with 9d22778
> "reach-cache.c: write prefix-compressed names in the index". Since
> the format has been stable for so long, almost all versions of Git
> in use today understand version 4, removing one barrier to upgrade
> -- that someone may want to downgrade and needs a working repo.
What about alternative implementations, like JGit, libgit2, etc.?
Show 36 quoted lines
> Despite being stable for a long time, this index version was never
> adopted as the default. This prefix-compressed version of the format
> can get significant space savings on repos with large working
> directories (which naturally tend to have deep nesting). This version
> is set as the default for some external tools, such as VFS for Git.
> Because of this external use, the format has had a lot of "testing in
> production" and also is subject to continuous integration in these
> environments.
> 
> Previously, to test version 4 indexes, we needed to run the test
> suite with GIT_TEST_INDEX_VERSION=4 (or TEST_GIT_INDEX_VERSION=4).
> 
> One potential, but short-term, downside is that we lose coverage of
> the version 3 indexes. The trade-off is that we may want to cover
> that version using GIT_TEST_INDEX_VERSION=3.
> 
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  read-cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/read-cache.c b/read-cache.c
> index 372588260e..af6c8f2a67 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -1484,7 +1484,7 @@ struct cache_entry *refresh_cache_entry(struct cache_entry *ce,
>   * Index File I/O
>   *****************************************************************/
>  
> -#define INDEX_FORMAT_DEFAULT 3
> +#define INDEX_FORMAT_DEFAULT 4
>  
>  static unsigned int get_index_format_default(void)
>  {
> -- 
> gitgitgadget
Previous: Derrick Stolee via GitGitGadgetNext: Junio C Hamano
Message 3 of 9 in “read-cache: update index format default to v4”
  1. 0/1 read-cache: update index format default to v4Derrick Stolee via GitGitGadget, Sep 24, 2018
  2. 1/1 read-cache: update index format default to v4Derrick Stolee via GitGitGadget, Sep 24, 2018
  3. SZEDER GáborSep 24, 2018
  4. Junio C HamanoSep 24, 2018
  5. Patrick SteinhardtSep 25, 2018
  6. Derrick StoleeSep 25, 2018
  7. Stefan BellerSep 25, 2018
  8. Ben PeartSep 25, 2018
  9. Matthias SohnSep 26, 2018

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.