Browse Source

org-git-link.el: Fix `org-git-find-gitdir'

* contrib/lisp/org-git-link.el (org-git-find-gitdir): Expand
abbreviated directory name.

TINYCHANGE
Chunyang Xu 2 years ago
parent
commit
1fbbce4d81
1 changed files with 1 additions and 1 deletions
  1. 1 1
      contrib/lisp/org-git-link.el

+ 1 - 1
contrib/lisp/org-git-link.el

@@ -126,7 +126,7 @@
   the path. Example: (org-git-find-gitdir
   \"~/gitrepos/foo/bar.txt\") returns
   '(\"/home/user/gitrepos/.git\" \"foo/bar.txt\"). When not in a git repository, return nil."
-  (let ((dir (file-name-directory path))
+  (let ((dir (expand-file-name (file-name-directory path)))
         (relpath (file-name-nondirectory path)))
     (catch 'toplevel
       (while (not (file-exists-p (expand-file-name ".git" dir)))