Quote filename for git add

Fixes git-auto-commit-mode for files with spaces in the filename.
This commit is contained in:
Moritz Breit 2015-03-20 21:13:15 +01:00
parent 7e4ed5f07a
commit e11eb392c0

View file

@ -107,7 +107,7 @@ Default to FILENAME."
(let* ((filename (buffer-file-name))
(commit-msg (gac--commit-msg filename)))
(shell-command
(concat "git add " filename " && git commit -m '" commit-msg "'"))))
(concat "git add '" filename "' && git commit -m '" commit-msg "'"))))
(defun gac-push ()
"Push commits to the current upstream.