Commit e90d463fbc51
Changed files (1)
.githooks
.githooks/prepare-commit-msg
@@ -1,30 +0,0 @@
-#!/usr/bin/env bash
-
-if [ -n "$2" ]; then
- exit
-fi
-
-# Skip if a string like 'squash!' is included in the original message
-if grep --quiet -P "^\\w+!" "$1"; then
- exit 0
-fi
-COMMIT=$(git symbolic-ref HEAD)
-
-# Generate a commit message from the diff of the commit
-IFS=$'\n'
-for s in $(git --no-pager diff --cached --name-status "$COMMIT"); do
- FILENAME=$(echo "$s" | cut -f2)
- STATUS=${s:0:1}
- # Insert a line into the message depending on the status of the file
- case ${STATUS} in
- M)
- SED_COMMAND="1i${FILENAME}: \n" ;;
- A)
- SED_COMMAND="1i${FILENAME}: Init\n" ;;
- esac
- sed -i "${SED_COMMAND}" "$1"
-done
-
-# Local Variables:
-# sh-basic-offset: 2
-# End: