projects
/
scilab.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add some Git hooks to ease dev.
[scilab.git]
/
git_hooks
/
prepare-commit-msg
1
#!/bin/sh
2
#
3
# Hook used to produce a commit message based on CHANGES
4
#
5
6
FILE="$1"
7
SOURCE="$2"
8
COMMIT="$3"
9
10
case $SOURCE in
11
'')
12
TMP=$(mktemp) && \
13
cat $FILE >$TMP && \
14
git diff --cached scilab/CHANGES_* |sed -n '/^+/p' |sed -n '/^+++/!p' |sed 's/^.\{1\}//g' >$FILE && \
15
cat $TMP >>$FILE && \
16
rm $TMP
17
;;
18
*)
19
;;
20
esac
21