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

git stash --include-untracked walks ignored directories

From
Brian Malehorn <bmalehorn@gmail.com>
Date
Jun 9, 2020, 19:33 UTC
Message-ID
<CAJB88a39G-GkGu1LuRE8na45Pav_cWb3cJLQFJM+FuW3BnromA@mail.gmail.com>
Hi,

Not sure if this is the right place to send this, but I'm here to report a performance regression with git stash --include-untracked.

Here's a quick way to reproduce:
1. make a directory with a lot of ignored files
$ find ignored -type f | wc -l
   50000

$ cat .gitignore ignored

2. touch foo
3. time git stash --include-untracked

git version 2.26.0: real 0m0.094s

git version 2.27.0.83.g0313f36c6e: real 0m1.913s

This is a much bigger pain point on my work repo, which has 1.4 million ignored files(!). As you can imagine it takes a long time to run git stash. While it might be valid to question why anyone would need that many files for any purpose, the bottom line is that I told git to ignore this directory, and it didn't ignore it.

In the meantime I've reverted to 2.26.0 which doesn't have this performance regression. Let me know if you want any other information related to this issue.

Thanks, Brian

Next: Elijah Newren
Message 1 of 3 in “git stash --include-untracked walks ignored directories”
  1. Brian MalehornJun 9, 2020
  2. Elijah NewrenJun 10, 2020
  3. Brian MalehornJun 10, 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.