Skip to content
Snippets Groups Projects
Unverified Commit 8deeb143 authored by Andreas Horn's avatar Andreas Horn
Browse files

fixes pre-commit to work properly if more than one file is staged

parent 4746624b
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ for file in $files; do ...@@ -78,7 +78,7 @@ for file in $files; do
echo -ne "${green}${clear}" echo -ne "${green}${clear}"
# only add the encrypted file if it was already staged # only add the encrypted file if it was already staged
if grep -Fxq "$file" "$stagedFiles"; then if echo "$stagedFiles" | grep -Fxq "$file"; then
git add $file git add $file
fi fi
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment