Cleanup git-commit slightly

This commit is contained in:
Tom Willemse 2015-04-03 09:43:04 +02:00
parent 858dc816f1
commit 9edaf8243d

View file

@ -104,11 +104,14 @@ Default to FILENAME."
(defun gac-commit () (defun gac-commit ()
"Commit the current buffer's file to git." "Commit the current buffer's file to git."
(let* ((filename (file-name-nondirectory (buffer-file-name))) (let* ((buffer-file (buffer-file-name))
(commit-msg (gac--commit-msg (buffer-file-name))) (filename (convert-standard-filename
(default-directory (file-name-directory (buffer-file-name)))) (file-name-nondirectory buffer-file)))
(commit-msg (gac--commit-msg buffer-file))
(default-directory (file-name-directory buffer-file)))
(shell-command (shell-command
(concat "git add " (shell-quote-argument (convert-standard-filename filename)) " && git commit -m " (shell-quote-argument commit-msg))))) (concat "git add " (shell-quote-argument filename)
" && git commit -m " (shell-quote-argument commit-msg)))))
(defun gac-push () (defun gac-push ()
"Push commits to the current upstream. "Push commits to the current upstream.