Support Windows paths
- Changes the current directory before commit - Quotes the filename arguments using shell-quote-argument
This commit is contained in:
parent
e7b3a146b8
commit
ca96589764
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ Default to FILENAME."
|
||||||
(let* ((filename (buffer-file-name))
|
(let* ((filename (buffer-file-name))
|
||||||
(commit-msg (gac--commit-msg filename)))
|
(commit-msg (gac--commit-msg filename)))
|
||||||
(shell-command
|
(shell-command
|
||||||
(concat "git add '" filename "' && git commit -m '" commit-msg "'"))))
|
(concat "cd " (shell-quote-argument (convert-standard-filename (file-name-directory (buffer-file-name)))) " && git add " (shell-quote-argument (convert-standard-filename (file-name-nondirectory filename))) " && git commit -m '" 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