From 6ac0d9cbc8d6c6c1a43e46518f9e6bc7801c74ff Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 29 Aug 2017 11:39:43 -0400 Subject: [PATCH] magit-run-git{k,-gui*}: Use magit-process-file Using call-process fails when the PATH doesn't contain the git-gui executable (e.g., when Git for Windows was installed with only the cmd/ directory on PATH). --- lisp/magit-extras.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el index e459a4f8e6..085372f427 100644 --- a/lisp/magit-extras.el +++ b/lisp/magit-extras.el @@ -51,7 +51,7 @@ "Run `git gui' for the current git repository." (interactive) (magit-with-toplevel - (call-process magit-git-executable nil 0 nil "gui"))) + (magit-process-file magit-git-executable nil 0 nil "gui"))) ;;;###autoload (defun magit-run-git-gui-blame (commit filename &optional linenum) @@ -73,7 +73,7 @@ blame to center around the line point is on." (magit-file-relative-name buffer-file-name))) (line-number-at-pos))))) (magit-with-toplevel - (apply #'call-process magit-git-executable nil 0 nil "gui" "blame" + (apply #'magit-process-file magit-git-executable nil 0 nil "gui" "blame" `(,@(and linenum (list (format "--line=%d" linenum))) ,commit ,filename)))) @@ -82,19 +82,19 @@ blame to center around the line point is on." (defun magit-run-gitk () "Run `gitk' in the current repository." (interactive) - (call-process magit-gitk-executable nil 0)) + (magit-process-file magit-gitk-executable nil 0)) ;;;###autoload (defun magit-run-gitk-branches () "Run `gitk --branches' in the current repository." (interactive) - (call-process magit-gitk-executable nil 0 nil "--branches")) + (magit-process-file magit-gitk-executable nil 0 nil "--branches")) ;;;###autoload (defun magit-run-gitk-all () "Run `gitk --all' in the current repository." (interactive) - (call-process magit-gitk-executable nil 0 nil "--all")) + (magit-process-file magit-gitk-executable nil 0 nil "--all")) ;;; Emacs Tools