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

Avoid scanning of entire repo when a file is deleted #248

Closed khhipparagi closed 8 months ago

khhipparagi commented 10 months ago

Issue #, if available:

The git secrets scans the entire repo when file is removed. For large repos, this impacts the user experience, if they are using any IDE for development, developer need to use terminal to force git secrets to skip the scan with --no-verify option.

Description of changes: This change is done, when no files are returned, then pre_commit_hook will gracefully return instead of calling scan_with_fn_or_die function.

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

khhipparagi commented 8 months ago

Duplicate of #249