Mercurial > hg > batch-feature-extraction-tool
annotate Lib/fftw-3.2.1/.git/hooks/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 check the commit log message. |
d@0 | 4 # Called by "git commit" with one argument, the name of the file |
d@0 | 5 # that has the commit message. The hook should exit with non-zero |
d@0 | 6 # status after issuing an appropriate message if it wants to stop the |
d@0 | 7 # commit. The hook is allowed to edit the commit message file. |
d@0 | 8 # |
d@0 | 9 # To enable this hook, rename this file to "commit-msg". |
d@0 | 10 |
d@0 | 11 # Uncomment the below to add a Signed-off-by line to the message. |
d@0 | 12 # Doing this in a hook is a bad idea in general, but the prepare-commit-msg |
d@0 | 13 # hook is more suited to it. |
d@0 | 14 # |
d@0 | 15 # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
d@0 | 16 # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
d@0 | 17 |
d@0 | 18 # This example catches duplicate Signed-off-by lines. |
d@0 | 19 |
d@0 | 20 test "" = "$(grep '^Signed-off-by: ' "$1" | |
d@0 | 21 sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { |
d@0 | 22 echo >&2 Duplicate Signed-off-by lines. |
d@0 | 23 exit 1 |
d@0 | 24 } |