From: Matthew Daniel <mdaniel@gmail.com>
To: Alexandre Julliard <julliard@winehq.org>
Cc: emacs-devel@gnu.org
Subject: PATCH: vc-git.el: alternative git executable locations
Date: Fri, 4 Mar 2011 10:54:25 +0100 [thread overview]
Message-ID: <AANLkTimG2_BQAxjxHs8jAU4jkBu0j2j=D2DefMBKe+tZ@mail.gmail.com> (raw)
[-- 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)))
next reply other threads:[~2011-03-04 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 9:54 Matthew Daniel [this message]
2011-03-10 8:25 ` PATCH: vc-git.el: alternative git executable locations Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTimG2_BQAxjxHs8jAU4jkBu0j2j=D2DefMBKe+tZ@mail.gmail.com' \
--to=mdaniel@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=julliard@winehq.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.