[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/orgit c110371202 57/76: orgit--repository-directory: Suppo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/orgit c110371202 57/76: orgit--repository-directory: Support relative paths again |
Date: |
Thu, 13 Jan 2022 13:58:47 -0500 (EST) |
branch: elpa/orgit
commit c110371202c06fb7a04f878dcfaef574efa0e5f6
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
orgit--repository-directory: Support relative paths again
Fixes #14^b.
---
orgit.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/orgit.el b/orgit.el
index 317bf040af..8b5c4ddb38 100644
--- a/orgit.el
+++ b/orgit.el
@@ -1,6 +1,6 @@
;;; orgit.el --- support for Org links to Magit buffers
-;; Copyright (C) 2014-2019 The Magit Project Contributors
+;; Copyright (C) 2014-2020 The Magit Project Contributors
;; Author: Jonas Bernoulli <jonas@bernoul.li>
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
@@ -423,14 +423,14 @@ store links to the Magit-Revision mode buffers for these
commits."
(abbreviate-file-name default-directory)))
(defun orgit--repository-directory (repo)
- (if (file-name-absolute-p repo)
- (let ((dir (file-name-as-directory (expand-file-name repo))))
- (unless (file-exists-p dir)
- (error "Cannot open link; %S does not exist" dir))
- dir)
- (or (cdr (assoc repo (magit-repos-alist)))
- (error "Cannot open link; no entry for %S in `%s'"
- repo 'magit-repository-directories))))
+ (let ((dir (or (cdr (assoc repo (magit-repos-alist)))
+ (file-name-as-directory (expand-file-name repo)))))
+ (cond ((file-exists-p dir) dir)
+ ((string-match-p "\\`[./]" repo)
+ (error "Cannot open link; %S does not exist" dir))
+ (t
+ (error "Cannot open link; no entry for %S in `%s'"
+ repo 'magit-repository-directories)))))
;;; _
(provide 'orgit)
- [nongnu] elpa/orgit cbce5871fe 29/76: Store all revisions and optionally all arguments in log links, (continued)
- [nongnu] elpa/orgit cbce5871fe 29/76: Store all revisions and optionally all arguments in log links, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 976f3c7d25 32/76: Support storing link(s) to selected commit(s), ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 692256bac9 33/76: Add Makefile, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit d909f92d3b 35/76: Bump copyright years, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit ea79e0567a 39/76: orgit-export-alist: Update kernel.org entry, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit ddb830c38c 43/76: make: Add new indirect dependencies, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 8a65bd2750 42/76: Favor pcase and subr-x over dash, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit a2d3937040 49/76: Adapt to changes in Magit, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit e23c7a6776 46/76: orgit--repository-directory: Error on non-existent directory, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 9598d71682 55/76: Revert "Add .github/FUNDING.yml", ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit c110371202 57/76: orgit--repository-directory: Support relative paths again,
ELPA Syncer <=
- [nongnu] elpa/orgit e147f05577 61/76: eval-after-load: replace string feature w/ symbol, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 229a2ae37a 65/76: orgit-export-alist: Add git.sr.ht entry, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 6a22c2e459 06/76: orgit-log-store: use branch name, not HEAD, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit efde657483 10/76: magit-log-export: use correct variable, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 455dac3422 15/76: orgit-export-alist: add gitlab and remove gitorious, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 2330a8cdb5 20/76: orgit-log-store: remove old kludges and todos, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 718343d40d 22/76: orgit-{log, rev}-open: use -let, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit adcfef22dc 28/76: add README.md, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit d91d16903d 27/76: support relative paths when opening and exporting links, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit c91e662ace 30/76: Add completion functions, ELPA Syncer, 2022/01/13