We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff54efd + 91b4395 commit 54b5067Copy full SHA for 54b5067
pre-commit
@@ -1,5 +1,13 @@
1
#!/bin/sh
2
3
+# If currently in a merge don't check files.
4
+MERGE=$(git rev-parse -q --verify MERGE_HEAD)
5
+if [[ ! -z "$MERGE" ]]
6
+then
7
+ # Currently in merge, let git handle the rest.
8
+ exit 0
9
+fi
10
+
11
# Get list of staged files excluding deleted files (lowercase d in --diff-filter).
12
FILES=$(git diff --cached --name-only --diff-filter=d | grep \\.php)
13
if [[ $(echo $FILES | wc -c) -eq "1" ]]
@@ -51,4 +59,4 @@ else
51
59
echo ${GREEN}Nothing to patch.${NC}
52
60
rm phpcspatch.diff
53
61
exit 0
54
-fi
62
0 commit comments