annotate Lib/fftw-3.2.1/.git/hooks/prepare-commit-msg.sample @ 8:fdc592312a96

Vectorised Xcorr
author Geogaddi\David <d.m.ronan@qmul.ac.uk>
date Wed, 22 Jul 2015 15:28:00 +0100
parents 25bf17994ef1
children
rev   line source
d@0 1 #!/bin/sh
d@0 2 #
d@0 3 # An example hook script to prepare the commit log message.
d@0 4 # Called by "git commit" with the name of the file that has the
d@0 5 # commit message, followed by the description of the commit
d@0 6 # message's source. The hook's purpose is to edit the commit
d@0 7 # message file. If the hook fails with a non-zero status,
d@0 8 # the commit is aborted.
d@0 9 #
d@0 10 # To enable this hook, rename this file to "prepare-commit-msg".
d@0 11
d@0 12 # This hook includes three examples. The first comments out the
d@0 13 # "Conflicts:" part of a merge commit.
d@0 14 #
d@0 15 # The second includes the output of "git diff --name-status -r"
d@0 16 # into the message, just before the "git status" output. It is
d@0 17 # commented because it doesn't cope with --amend or with squashed
d@0 18 # commits.
d@0 19 #
d@0 20 # The third example adds a Signed-off-by line to the message, that can
d@0 21 # still be edited. This is rarely a good idea.
d@0 22
d@0 23 case "$2,$3" in
d@0 24 merge,)
d@0 25 /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
d@0 26
d@0 27 # ,|template,)
d@0 28 # /usr/bin/perl -i.bak -pe '
d@0 29 # print "\n" . `git diff --cached --name-status -r`
d@0 30 # if /^#/ && $first++ == 0' "$1" ;;
d@0 31
d@0 32 *) ;;
d@0 33 esac
d@0 34
d@0 35 # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
d@0 36 # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"