Provide default message when buffer is empty.

This commit is contained in:
Marius Vollmer 2008-08-05 00:30:16 +03:00
parent dd1c47e09e
commit 2f9c95ae25

View file

@ -369,7 +369,9 @@
(defun gits-log-edit-commit ()
(interactive)
(write-region (point-min) (point-max) ".git/gits-log")
(if (> (buffer-size) 0)
(write-region (point-min) (point-max) ".git/gits-log")
(write-region "(Empty description)" nil ".git/gits-log"))
(erase-buffer)
(gits-run "git-commit" "-F" ".git/gits-log")
(bury-buffer)