Linus Torvalds | a3e870f | 2005-05-30 12:51:00 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | git-status-script > .editmsg |
| 3 | if [ "$?" != "0" ] |
| 4 | then |
| 5 | cat .editmsg |
| 6 | exit 1 |
| 7 | fi |
Junio C Hamano | 2036d84 | 2005-05-30 13:53:45 -0700 | [diff] [blame] | 8 | ${VISUAL:-${EDITOR:-vi}} .editmsg |
Linus Torvalds | a3e870f | 2005-05-30 12:51:00 -0700 | [diff] [blame] | 9 | grep -v '^#' < .editmsg | git-stripspace > .cmitmsg |
| 10 | [ -s .cmitmsg ] || exit 1 |
| 11 | tree=$(git-write-tree) || exit 1 |
| 12 | commit=$(cat .cmitmsg | git-commit-tree $tree -p HEAD) || exit 1 |
Alexey Guzeev | ef6a46e | 2005-06-01 00:31:02 -0400 | [diff] [blame] | 13 | echo $commit > ${GIT_DIR:-.git}/HEAD |