home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e90d463fbc512721cb592f4eba1471e662fc84f1
parent fa5f04d26be66ccece7ad42307379d213664f15c
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Sat,  9 May 2020 14:06:47 +0200

hooks: remove prepare-commit-msg

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
D.githooks/prepare-commit-msg | 30------------------------------
1 file changed, 0 insertions(+), 30 deletions(-)

diff --git a/.githooks/prepare-commit-msg b/.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: