awslabs / git-secrets

Prevents you from committing secrets and credentials into git repositories
Apache License 2.0
12.36k stars 1.17k forks source link

serialize filewise args to 'grep' and 'git grep' #153

Open nasamuffin opened 4 years ago

nasamuffin commented 4 years ago

Issue #, if available: Fixes #192

Description of changes: There is a maximum number of args which can be passed to via the command line. To avoid it when invoking 'git-grep' or 'grep', let's use xargs to invoke a new process when the number of args exceeds the system limit. Semantically the results should be identical.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jrn commented 4 years ago

(still figuring out the GitHub UI, sorry).

Can there be a test of the behavior with a high number of files?

jrn commented 4 years ago

Just some coding style nits.

Still looking for tests as well.

sparr commented 1 year ago

@nasamuffin Could you rebase this without #155? It would be easier to proceed on the two changes independently. You might also rebase on master to replace my merge commit above.