blob: e818d0a35ce2a9f5358520b7c44dfe27845de4b7 [file] [log] [blame]
Linus Torvaldsa3e870f2005-05-30 12:51:00 -07001#!/bin/sh
2git-status-script > .editmsg
3if [ "$?" != "0" ]
4then
5 cat .editmsg
6 exit 1
7fi
Junio C Hamano2036d842005-05-30 13:53:45 -07008${VISUAL:-${EDITOR:-vi}} .editmsg
Linus Torvaldsa3e870f2005-05-30 12:51:00 -07009grep -v '^#' < .editmsg | git-stripspace > .cmitmsg
10[ -s .cmitmsg ] || exit 1
11tree=$(git-write-tree) || exit 1
12commit=$(cat .cmitmsg | git-commit-tree $tree -p HEAD) || exit 1
Alexey Guzeevef6a46e2005-06-01 00:31:02 -040013echo $commit > ${GIT_DIR:-.git}/HEAD