Ensure trailing slash for default-directory.
This commit is contained in:
parent
327f0af4f8
commit
03bcfb0158
1 changed files with 1 additions and 1 deletions
2
magit.el
2
magit.el
|
@ -715,7 +715,7 @@ Many Magit faces inherit from this one by default."
|
||||||
(defun magit-get-top-dir (cwd)
|
(defun magit-get-top-dir (cwd)
|
||||||
(let ((cwd (expand-file-name (file-truename cwd))))
|
(let ((cwd (expand-file-name (file-truename cwd))))
|
||||||
(when (file-directory-p cwd)
|
(when (file-directory-p cwd)
|
||||||
(let* ((default-directory cwd)
|
(let* ((default-directory (file-name-as-directory cwd))
|
||||||
(cdup (magit-git-string "rev-parse" "--show-cdup")))
|
(cdup (magit-git-string "rev-parse" "--show-cdup")))
|
||||||
(when cdup
|
(when cdup
|
||||||
(file-name-as-directory (expand-file-name cdup cwd)))))))
|
(file-name-as-directory (expand-file-name cdup cwd)))))))
|
||||||
|
|
Loading…
Reference in a new issue