Skip to content

Commit

Permalink
check copied, renamed and modified files as well
Browse files Browse the repository at this point in the history
When using diff-filter at first, I probably thought it was about lines,
when in fact, it was about lines.
  • Loading branch information
Grégoire Paris committed Aug 6, 2015
1 parent 2325896 commit bce6f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template/hooks/junkchecker/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ then
if [ -f $FILE ]
then
for PHRASE in `cat $junkchecker_phrases_file`; do
git diff --cached --diff-filter=A $FILE | grep --quiet $PHRASE
git diff --cached --diff-filter=ACMR $FILE | grep -E '^\+' | grep --quiet $PHRASE
if [ $? -eq 0 ]
then
cat <<- EOT >&2
Expand Down

0 comments on commit bce6f6d

Please sign in to comment.