2005-05-30 21:51:00 +02:00
|
|
|
#!/bin/sh
|
|
|
|
git-status-script > .editmsg
|
|
|
|
if [ "$?" != "0" ]
|
|
|
|
then
|
|
|
|
cat .editmsg
|
|
|
|
exit 1
|
|
|
|
fi
|
2005-05-30 22:53:45 +02:00
|
|
|
${VISUAL:-${EDITOR:-vi}} .editmsg
|
2005-05-30 21:51:00 +02:00
|
|
|
grep -v '^#' < .editmsg | git-stripspace > .cmitmsg
|
|
|
|
[ -s .cmitmsg ] || exit 1
|
|
|
|
tree=$(git-write-tree) || exit 1
|
|
|
|
commit=$(cat .cmitmsg | git-commit-tree $tree -p HEAD) || exit 1
|
|
|
|
echo $commit > .git/HEAD
|