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

git status --ignored hangs when a deep directory structure present in working tree

From
MMMartin Melka <martin.melka@gmail.com>
Date
Jan 27, 2020, 10:55 UTC
Message-ID
<CANt4O2L_DZnMqVxZzTBMvr=BTWqB6L0uyORkoN_yMHLmUX7yHw@mail.gmail.com>

Hi all, I have ran across what might be a bug in git. When there is a deep directory structure (tried on 100+ nested dirs), then git status --ignored hangs indefinitely. Discovered this on OSX (Mojave, git 2.20.1 (Apple Git-117)), but it reproduces in Ubuntu (19.04, git 2.25.0) Docker container on OSX and also on baremetal Ubuntu server (16.04, git 2.17.1).

Steps to reproduce:
1. Generate the deep dir structure:
    mkdir gittest; pushd gittest; git init; for i in $(seq 1 120); do
mkdir dir; cd dir; done; touch leaf; popd
2. Try to get git status --ignored
    cd gittest && git status --ignored

If there is a dir depth limit, git should probably exit with an error rather than getting stuck endlessly.

StackOverflow report: https://stackoverflow.com/questions/59928800/git-status-ignored-hangs-indefinitely

Best regards, Martin Melka

Next: SZEDER Gábor
Message 1 of 6 in “git status --ignored hangs when a deep directory structure present in working tree”
  1. Martin MelkaJan 27, 2020
  2. SZEDER GáborJan 27, 2020
  3. Elijah NewrenJan 28, 2020
  4. SZEDER GáborJan 28, 2020
  5. Elijah NewrenJan 28, 2020
  6. Elijah NewrenJan 29, 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.