Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions git-secrets
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ pre_commit_hook() {
while IFS= read -r file; do
[ -n "$file" ] && files+=("$file")
done <<< "$(git diff-index --diff-filter 'ACMU' --name-only --cached $rev --)"
# when the file list empty, then don't all the scan, otherwise it will start scanning entire repo
[[ -z "${files[@]}" ]] && return
scan_with_fn_or_die "scan" "${files[@]}"
}

Expand Down