Skip to content

Commit bce6f6d

Browse files
author
Grégoire Paris
committed
check copied, renamed and modified files as well
When using diff-filter at first, I probably thought it was about lines, when in fact, it was about lines.
1 parent 2325896 commit bce6f6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/hooks/junkchecker/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ then
1313
if [ -f $FILE ]
1414
then
1515
for PHRASE in `cat $junkchecker_phrases_file`; do
16-
git diff --cached --diff-filter=A $FILE | grep --quiet $PHRASE
16+
git diff --cached --diff-filter=ACMR $FILE | grep -E '^\+' | grep --quiet $PHRASE
1717
if [ $? -eq 0 ]
1818
then
1919
cat <<- EOT >&2

0 commit comments

Comments
 (0)