pre-commit-src/pre-commit-script.sh
changeset 25715 3200f6603386
parent 25714 074ea5523f84
child 25716 b62514f9d365
equal deleted inserted replaced
25714:074ea5523f84 25715:3200f6603386
   585     if [ -n "$matched_pre_commit_tests_in_unstaged" ]; then
   585     if [ -n "$matched_pre_commit_tests_in_unstaged" ]; then
   586         last_error="Unstaged changes detected in pre-commit-tests file. Stage pre-commit tests changes before continuing."
   586         last_error="Unstaged changes detected in pre-commit-tests file. Stage pre-commit tests changes before continuing."
   587         return 1
   587         return 1
   588     fi
   588     fi
   589     # Only if something changed in pre commit or pre commit tests the unit tests should be run
   589     # Only if something changed in pre commit or pre commit tests the unit tests should be run
   590     if [ -z "$matched_pre_commit_in_unstaged" + "$matched_pre_commit_script_in_unstaged" "$matched_pre_commit_tests_in_unstaged" ]; then
   590     if [ -z "$matched_pre_commit_in_unstaged$matched_pre_commit_script_in_unstaged$matched_pre_commit_tests_in_unstaged" ]; then
   591         check_unit_tests
   591         check_unit_tests
   592     fi
   592     fi
   593 }
   593 }
   594 
   594 
   595 # For testing purposes only if the script has no arguments or the argument is main the process should run
   595 # For testing purposes only if the script has no arguments or the argument is main the process should run