git.el: Allow to commit even if there are no marked files.

This can be useful to commit a merge that didn't result in any
changes.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard
2008-11-07 14:28:09 +01:00
parent c4e8b72f22
commit 1905a8666a

View File

@ -895,8 +895,6 @@ Return the list of files that haven't been handled."
(unless (git-empty-db-p)
(setq head (git-rev-parse "HEAD")
head-tree (git-rev-parse "HEAD^{tree}")))
(if files
(progn
(message "Running git commit...")
(when
(and
@ -917,7 +915,6 @@ Return the list of files that haven't been handled."
(message "Committed %s." commit)
(git-run-hook "post-commit" nil)))
(message "Commit aborted."))))
(message "No files to commit.")))
(delete-file index-file))))))