From e11eb392c06a086e2bb2814f956a391755bf3c66 Mon Sep 17 00:00:00 2001 From: Moritz Breit Date: Fri, 20 Mar 2015 21:13:15 +0100 Subject: [PATCH] Quote filename for git add Fixes git-auto-commit-mode for files with spaces in the filename. --- git-auto-commit-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-auto-commit-mode.el b/git-auto-commit-mode.el index 2456fa7..0e9eaeb 100644 --- a/git-auto-commit-mode.el +++ b/git-auto-commit-mode.el @@ -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.