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

Re: git-status and git-diff now very slow in project with a submodule

From
Junio C Hamano <gitster@pobox.com>
Date
May 20, 2010, 22:59 UTC
Message-ID
<7vbpca6uxi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201005201817.05593.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
> Also, I don't want *.log, or *.ps -- neither of them is guaranteed to be an 
> ignore pattern.  These throw away files have all sorts of names, made up on 
> the spot as I'm working, adding them to an ignore file is overkill from my 
> point of view.

I've learned to give them names that begin with an unusual letter (in my case, a colon or a plus sign), way before I started working on git, so the above is not a very convincing argument at least to me.

In any case, I am a bit torn about this whole issue.

On one hand, scanning for untracked files are not about these *.log cruft, but to catch mistakes that are caused by new paths that you forgot to add, and in that sense, uncommitted modifications to a path that happens to be tracked and a new path that you forgot to add have (semantically) similar chance of being a mistake that you might want to catch by running "git status".

On the other hand, adding new paths to an existing project is a rare event, compared to modifications to existing paths (e.g. even for a project as small and young as git.git, we have 10x as many revisions as we have paths), so by definition the chance that you might break others' builds by forgetting to commit a new file is much smaller than forgetting to commit necessary changes to existing files.

But ideally you would want your tool to catch mistakes that are rarer, as you would learn to avoid common mistakes on your own without help from your tool over time.

At least we should be able to let the users say, with "git status -uno", "I don't care about untracked and unignored paths; I don't make such a mistake to forget adding new paths", and optimize the scanning of submodule directories taking advantage of that statement. Is there a fundamental reason why things shouldn't work that way, or is it just a bug in the current code?

Previous: Andy ParkinsNext: Jens Lehmann
Message 11 of 16 in “git-status and git-diff now very slow in project with a submodule”
  1. Andy ParkinsMay 20, 2010
  2. Stefan NaeweMay 20, 2010
  3. Andy ParkinsMay 20, 2010
  4. Michael J GruberMay 20, 2010
  5. Andy ParkinsMay 20, 2010
  6. Jens LehmannMay 20, 2010
  7. Andy ParkinsMay 20, 2010
  8. Nguyen Thai Ngoc DuyMay 21, 2010
  9. Junio C HamanoMay 20, 2010
  10. Andy ParkinsMay 20, 2010
  11. Junio C HamanoMay 20, 2010
  12. Jens LehmannMay 21, 2010
  13. Leo RazoumovMay 21, 2010
  14. Andreas SchwabMay 21, 2010
  15. Jens LehmannMay 22, 2010
  16. Jens LehmannMay 22, 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.