emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/orgit 7d6afa5ae9 60/76: orgit-log-open: Call magit-log-arg


From: ELPA Syncer
Subject: [nongnu] elpa/orgit 7d6afa5ae9 60/76: orgit-log-open: Call magit-log-arguments from repo
Date: Thu, 13 Jan 2022 13:58:47 -0500 (EST)

branch: elpa/orgit
commit 7d6afa5ae935ebc8895168529e85268414731214
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    orgit-log-open: Call magit-log-arguments from repo
    
    Calling orgit-log-open from an Org buffer that is not in a Git
    repository signals a magit-outside-git-repo error that is triggered by
    the call to magit-log-arguments.  Holding the Magit version constant
    at the current master (0f1234e7), this failure bisects to
    a2d3937 (Adapt to changes in Magit, 2019-04-17).
    
    Reposition the default-directory binding so that magit-log-arguments
    is called within the linked repo.
    
    Note that orgit-rev-open calls magit-diff-arguments, so it _could_ hit
    the same failure, but that call already happens with default-directory
    correctly bound.
    
    Fixes #34.
---
 orgit.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/orgit.el b/orgit.el
index f476cfd37e..d843aaf0da 100644
--- a/orgit.el
+++ b/orgit.el
@@ -303,14 +303,14 @@ In that case `orgit-rev-store' stores one or more links 
instead."
 ;;;###autoload
 (defun orgit-log-open (path)
   (pcase-let* ((`(,repo ,args) (split-string path "::"))
+               (default-directory (orgit--repository-directory repo))
                (`(,revs ,args ,files)
                 (cond ((string-prefix-p "((" args)
                        (read args))
                       ((string-prefix-p "(" args)
                        (list (read args) (car (magit-log-arguments))))
                       (t
-                       (list (list args) (car (magit-log-arguments))))))
-               (default-directory (orgit--repository-directory repo)))
+                       (list (list args) (car (magit-log-arguments)))))))
     (magit-log-setup-buffer revs args files)))
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]