* PATCH: vc-git.el: alternative git executable locations
@ 2011-03-04 9:54 Matthew Daniel
2011-03-10 8:25 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Daniel @ 2011-03-04 9:54 UTC (permalink / raw)
To: Alexandre Julliard; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
Hello Alexandre,
I saw on emacs-devel that patches against vc-git.el should be directed to you.
I interact with some git projects, but I do not leave the MinGW-git in
my PATH. Thus, I need to be able to tell Emacs where to find git.
The other vc elisps used a defcustom named vc-${vc}-program, so I
named the git one to follow their convention.
Thanks for your time,
-- /v\atthew
[-- Attachment #2: emacs_vc-git.patch --]
[-- Type: application/octet-stream, Size: 1489 bytes --]
=== modified file 'lisp/vc/vc-git.el'
--- lisp/vc/vc-git.el 2010-11-09 20:07:10 +0000
+++ lisp/vc/vc-git.el 2011-03-03 21:29:12 +0000
@@ -109,6 +109,13 @@
(require 'vc-dir)
(require 'grep))
+(defcustom vc-git-program "git"
+ "String which contains the executable to invoke for Git support.
+If the string is not a fully-qualified path, then the normal execp
+semantics will apply."
+ :type 'string
+ :group 'vc)
+
(defcustom vc-git-diff-switches t
"String or list of strings specifying switches for Git diff under VC.
If nil, use the value of `vc-diff-switches'. If t, use no switches."
@@ -990,7 +997,7 @@
(defun vc-git-command (buffer okstatus file-or-list &rest flags)
"A wrapper around `vc-do-command' for use in vc-git.el.
The difference to vc-do-command is that this function always invokes `git'."
- (apply 'vc-do-command (or buffer "*vc*") okstatus "git" file-or-list flags))
+ (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program file-or-list flags))
(defun vc-git--empty-db-p ()
"Check if the git db is empty (no commit done yet)."
@@ -1001,7 +1008,7 @@
;; We don't need to care the arguments. If there is a file name, it
;; is always a relative one. This works also for remote
;; directories.
- (apply 'process-file "git" nil buffer nil command args))
+ (apply 'process-file vc-git-program nil buffer nil command args))
(defun vc-git--out-ok (command &rest args)
(zerop (apply 'vc-git--call '(t nil) command args)))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-10 8:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04 9:54 PATCH: vc-git.el: alternative git executable locations Matthew Daniel
2011-03-10 8:25 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.