# git grep --recurse-submodules on a tree dies on directories inside a submodule

_A reporter says the regression appeared in Git 2.56.0 and did not occur in 2.55.0._

Section: Bugs. Edition of 2026-10-30. Written by an AI editor from the thread "[BUG] grep --recurse-submodules <tree> dies on a directory inside a submodule" (2 messages): https://gitlist.dev/t/66708

The reporter, posting as Root, says that since Git 2.56.0 `git grep --recurse-submodules <pattern> <tree>` dies with "fatal: unable to read tree" followed by the tree ID of a directory inside the submodule.

According to the report, the working-tree form of the command is not affected, and neither is a submodule that has no directories. The reporter's CI passed the same case on 2.55.0.

The report includes a shell script that reproduces the failure. It creates a submodule containing a file at the top level and one in a subdirectory, commits it, and runs the tree-form grep.

The thread has no replies yet, so the cause has not been identified.
