Cleanup git-commit slightly
This commit is contained in:
parent
858dc816f1
commit
9edaf8243d
1 changed files with 7 additions and 4 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue