From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Hetzner Subject: [PATCH] org-attach.el: fix check for git annex Date: Sat, 16 May 2015 19:10:09 -0700 Message-ID: <5557f883.036f440a.60dc.ffffff37@mx.google.com> References: <55452cc1.c28e440a.4541.ffff8b76@mx.google.com> <871tisi1xs.fsf@nicolasgoaziou.fr> Reply-To: Erik Hetzner Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yto1x-00087T-ML for emacs-orgmode@gnu.org; Sat, 16 May 2015 22:10:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yto1t-0005TU-Kt for emacs-orgmode@gnu.org; Sat, 16 May 2015 22:10:17 -0400 Received: from mail-pd0-x22e.google.com ([2607:f8b0:400e:c02::22e]:33355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yto1t-0005TI-Dr for emacs-orgmode@gnu.org; Sat, 16 May 2015 22:10:13 -0400 Received: by pdbqa5 with SMTP id qa5so88616288pdb.0 for ; Sat, 16 May 2015 19:10:12 -0700 (PDT) In-Reply-To: <871tisi1xs.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode , John Wiegley , Nicolas Goaziou * lisp/org-attach.el (org-attach-commit): Check for .git/annex dir in addition to annex dir in root git dir to ensure that git annex is used --- lisp/org-attach.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 1737ec1..7f61910 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -283,7 +283,8 @@ This checks for the existence of a \".git\" directory in that directory." (cd dir) (let ((have-annex (and org-attach-git-annex-cutoff - (file-exists-p (expand-file-name "annex" git-dir))))) + (or (file-exists-p (expand-file-name "annex" git-dir)) + (file-exists-p (expand-file-name ".git/annex" git-dir)))))) (dolist (new-or-modified (split-string (shell-command-to-string -- 2.1.4