branch: elpa/magit
commit bb89386d984053e26e03bbef6020558ec68185fe
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-file-relative-name: Remove special handling of indirect buffers
The removed handling was added when this function was first added
in [1: 9ca3a8df92], but since we do not do the same anywhere else
it is hard to imagine that this actually ever makes something work
that otherwise would not work.
1: 2013-09-02 9ca3a8df9295ec957a3c0ac4f49274554d4d156b
add magit-buffer-file-name
---
lisp/magit-git.el | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index f60c5d5f5a6..c529518a87b 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1022,13 +1022,11 @@ If the file is not inside a Git repository, then return
nil.
If TRACKED is non-nil, return the path only if it matches a
tracked file."
- (and-let* ((file (with-current-buffer (or (buffer-base-buffer)
- (current-buffer))
- (or file
- magit-buffer-file-name
- buffer-file-name
- (and (derived-mode-p 'dired-mode)
- default-directory))))
+ (and-let* ((file (or file
+ magit-buffer-file-name
+ buffer-file-name
+ (and (derived-mode-p 'dired-mode)
+ default-directory)))
((or (not tracked)
(magit-file-tracked-p (file-relative-name file))))
(dir (magit-toplevel