Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 42413b0

Browse files
Merge pull request #224 from Trivadis/bugfix/issue-223-first-check-empty-staging-area
check for empty staging area earlier
2 parents e637d1e + d5b1dc5 commit 42413b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hook/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ function check_if_formatter_can_be_applied() {
156156
if [[ "$ROOT_PATH" = "" ]]; then
157157
# Provide information why changes are committed without calling the formatter.
158158
# Formatting code is de facto optional. As a result we do not want the pre-commit hook to abort.
159+
exit_when_no_staged_files_found
159160
exit_when_formatter_prerequisites_are_missing
160161
exit_when_using_non_default_staging_area
161162
exit_when_partially_staged_files_exist
162-
exit_when_no_staged_files_found
163163
fi
164164
}
165165

0 commit comments

Comments
 (0)