summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-12-06 15:22:50 +0100
committerBastien Guerry <bzg@altern.org>2013-12-06 15:22:50 +0100
commit6a86f32c70d731630e550d7a6b85b845603a81cf (patch)
treefae936a4eca04a5a2c42abba273088d231c0f43a
parentaf6f14d907dc2f0116af9e513bbbd3771cc690aa (diff)
downloadorg-mode-6a86f32c70d731630e550d7a6b85b845603a81cf.tar.gz
org-attach.el: Check whether git is installed
* org-attach.el (vc-git): Require. (org-attach-commit): Check whether git is installed. Thanks to Jonathan Leech-Pepin for reporting this.
-rw-r--r--lisp/org-attach.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 898d911..58ec2d1 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -41,8 +41,7 @@
(require 'cl))
(require 'org-id)
(require 'org)
-
-(declare-function vc-git-root "vc-git" (file))
+(require 'vc-git)
(defgroup org-attach nil
"Options concerning entry attachments in Org-mode."
@@ -266,7 +265,7 @@ This checks for the existence of a \".git\" directory in that directory."
(let* ((dir (expand-file-name org-attach-directory))
(git-dir (vc-git-root dir))
(changes 0))
- (when git-dir
+ (when (and git-dir (executable-find "git"))
(with-temp-buffer
(cd dir)
(let ((have-annex