Эх сурвалжийг харах

improve git pre-commit hook

[skip ci]
oz123 10 жил өмнө
parent
commit
84c129e4ff

+ 10 - 10
documentation/general_notes.txt

@@ -84,16 +84,16 @@ finally you should step into:
 # when developing pwman3 you might be using a debugger. if so add the following 
   pre-commit hook to your .git/ :
 
-$ cat .git/hooks/pre-commit 
-#!/bin/bash
-VAR=$(git diff --cached | grep "import ipdb; ipdb.set_trace")
-if [ ! -z "$VAR" ]; then
-  echo "You've left a BREAK POINT in one of your files! Aborting commit..."
-  exit 1
-fi 
-
-make test || exit 1
-exit 0
+    $ cat .git/hooks/pre-commit 
+    #!/bin/bash
+    VAR=$(git diff --cached | grep "\+*import i*pdb; i*pdb.set_trace")
+    if [ ! -z "$VAR" ]; then
+      echo "You've left a BREAK POINT in one of your files! Aborting commit..."
+      exit 1
+    fi 
+
+    make test || exit 1
+    exit 0
 
 ### testing :