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

Re: Stat cache in .git/index hinders syncing of repositories

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 18, 2020, 18:15 UTC
Message-ID
<xmqq7e1od41x.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<87v9p9skjz.fsf@drac>
Christoph Groth <christoph@grothesque.org> writes:
Show 5 quoted lines
> However, there is one problem with syncing git repositories, that has
> been noticed by multiple people [1]: The file .git/index contains not
> only the “git index”, but also a cache of stat-data of the files in the
> working directory.  Some file synchronizers are able to sync mtimes, but
> syncing ctimes would be bizarre (if it is even possible).

The stat-data in the index file is meant to be a mere optimization, and after copying .git/index and the working tree files to a new box, running "git update-index --refresh" would make them in sync, no?

Previous: Christoph GrothNext: Christoph Groth
Message 2 of 9 in “Stat cache in .git/index hinders syncing of repositories”
  1. Christoph GrothJan 17, 2020
  2. Junio C HamanoJan 18, 2020
  3. Christoph GrothJan 18, 2020
  4. brian m. carlsonJan 18, 2020
  5. Christoph GrothJan 18, 2020
  6. Johannes SchindelinJan 20, 2020
  7. Christoph GrothJan 20, 2020
  8. brian m. carlsonJan 21, 2020
  9. Christoph GrothJan 24, 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.