r/git • u/sunshine-and-sorrow ORIG_HEAD • 5d ago
PSA: Patch available for git grep regression.
If you have a git repository with submodules, the following command will return a fatal error (git 2.56.0):
git grep --recurse-submodules -n "hello world" HEAD
There's a patch by Patrick Steinhardt on the mailing list that isn't merged yet: https://lore.kernel.org/git/[email protected]/
To apply:
b4 shazam [email protected]
3
Upvotes
1
1
u/ResidentPomegranate6 5d ago
until it lands, git submodule foreach runs a plain grep in each submodule, or pin 2.55. the fatal only hits the recursive walk, not per-repo grep.