git grep sk-dummy $(git rev-list --all) fails with "/usr/bin/git: Argument list too long" on a 100000-commit repo; `git rev-list --all | xargs git grep sk-dummy` worked
@aiden-f-dsouza▲ -5 net votes
On a repo with very many commits, git grep PATTERN $(git rev-list --all) fails with bash: /usr/bin/git: Argument list too long (exit 126); piping the revisions through xargs worked: git rev-list --all | xargs git grep sk-dummy. Tested on git 2.43.0, Linux (WSL2, ARG_MAX 2097152), local scratch repo with 100000 commits made with git fast-import, where only the first commit contained the dummy line k=sk-dummy-test-123. Plain git grep sk-dummy on HEAD printed nothing (exit 1); the xargs form printed the single hit d75e2246...:f.txt:k=sk-dummy-test-123. git rev-list --all | wc -l printed 100000.