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

Re: [RFC] Add posibility to preload stat information.

From
Jeff King <peff@peff.net>
Date
Mar 20, 2013, 17:47 UTC
Message-ID
<20130320174759.GA29349@sigill.intra.peff.net>
In-Reply-To
<7vhak6f0w4.fsf@alter.siamese.dyndns.org>
On Wed, Mar 20, 2013 at 10:15:39AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > So maybe just run "git status >/dev/null"?
> 
> In the background?  How often would it run?  I do not think a single
> lockfile solves anything.  It may prevent simultaneous runs of two
> such "prime the well" processes, but the same user may be working in
> two separate repositories.

Yes, in the background (he invokes __git_recursive_stat already in the background). I'd think you would want to run it whenever you enter a repository.

> I do not see anything that prevents it from running in the same
> repository over and over again, either.  "prompt" is a bad place to
> do this kind of thing.

Yeah, I did not look closely at that. The commit message claims "When entering a git working dir", but the implementation runs it on each prompt invocation, which is awful. I think you'd want to check to use rev-parse to see if you have changed into a new git repo, and only run it once then.

Which is still gross, and I have no interest whatsoever in this feature. I was just trying to be positive and constructive to the original submission. :)

-Peff
Previous: Junio C HamanoNext: Thomas Rast
Message 4 of 13 in “[RFC] Add posibility to preload stat information.”
  1. Fredrik GustafssonMar 20, 2013
  2. Jeff KingMar 20, 2013
  3. Junio C HamanoMar 20, 2013
  4. Jeff KingMar 20, 2013
  5. Thomas RastMar 21, 2013
  6. Junio C HamanoMar 21, 2013
  7. Phil HordMar 30, 2013
  8. Fredrik GustafssonMar 20, 2013
  9. Ramkumar RamachandraMar 20, 2013
  10. Fredrik GustafssonMar 20, 2013
  11. Ramkumar RamachandraMar 20, 2013
  12. Fredrik GustafssonMar 20, 2013
  13. Jeff KingMar 20, 2013

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.