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

Re: git performance after directory copy

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 20, 2010, 10:54 UTC
Message-ID
<4C973D5F.4080807@drmicha.warpmail.net>
In-Reply-To
<vpq62y0hh63.fsf@bauges.imag.fr>
Matthieu Moy venit, vidit, dixit 20.09.2010 11:56:
Show 12 quoted lines
> "Gaer, A." <Andreas.Gaer@baslerweb.com> writes:
> 
>> On a copied source directory "git status" seems to be about
>> 3 times slower than on the original directory.
> 
> It is expected that the first "git status" be slower. It will most
> likely have to actually re-diff the files and update the index
> stat-cache.
> 
> But I'm surprised that the next "git status" are still slow. Other
> people may get a better explanation, but this very much looks like a
> bug.

In the OP's case, the inode/dev info differs (after copying, or after moving across FS boundaries). I don't think "git status" updates these. I noticed (and reported) something like this a while ago when, after a reboot, I would get warnings about crossing FS boundaries. Only a "rm .git/index && git reset --hard" was able to refresh the index properly. This case seems to be similar, although a simple "git reset --hard" appears to suffice.

Michael
Previous: Matthieu MoyNext: Gaer, A.
Message 4 of 8 in “git performance after directory copy”
  1. Gaer, A.Sep 20, 2010
  2. Michael J GruberSep 20, 2010
  3. Matthieu MoySep 20, 2010
  4. Michael J GruberSep 20, 2010
  5. AW: git performance after directory copyGaer, A., Sep 20, 2010
  6. Johannes SixtSep 20, 2010
  7. AW: git performance after directory copyGaer, A., Sep 20, 2010
  8. Matthieu MoySep 20, 2010

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.