diff --git a/.gitignore b/.gitignore index 3146761..39f9b7e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,41 +10,16 @@ toslive/version.txt toslive/airootfs/root/customize_airootfs.sh -!repo/arch/public.gpg - -repo/ccat/ - -repo/i3lock/ - -repo/lsd/ - -repo/polybar/ - -repo/r8/ - -repo/vs/ - -repo/color/ - -repo/font/ +repo/* -repo/font2/ - -repo/font3/ - -repo/arch/ - -repo/kernel/ - -repo/I3/ - -repo/ST/ - -repo/NVIDIA/ - -repo/readme/ - -repo/shunit/ +!repo/BUILD +!repo/arch/public.gpg +!repo/index.html +!repo/*.sh +!repo/*.conf +!repo/Jenkinsfile +!repo/docker-compose.yml +!repo/Dockerfile -repo/installer-backend/ +repo/BUILD/test diff --git a/hooks/commit-msg b/hooks/commit-msg index eed2305..a18a0e0 100755 --- a/hooks/commit-msg +++ b/hooks/commit-msg @@ -90,8 +90,18 @@ function print_errors { [[ ! "$EXIT_CODE_DESC" -eq "0" ]] && { log "1" "Status" ; exit 1 ; } } +function run_check_if_merge_commit { + # skip the entire check if it is a merge commit + if echo "$1" | grep -Eq "^Merge .* into .*"; then + log "0" "Merge commit" + log "0" "Status" + exit 0 + fi +} + data="$(sed '/^ *#/d' $1)" +run_check_if_merge_commit "$data" run_prepend_commit_msg "$data" run_commit_msg_has_description "$data" run_commit_msg_first_line_small "$data"