equal
deleted
inserted
replaced
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 |