branch: elpa/helm commit cc2518136ce67827bad070a2d9a3f0f5e82a409f Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Fix commit cbaed45f and 903f99bf where helm-browse-project was pushing t to hist, thus abs filename was used for roots dirnames. --- helm-files.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/helm-files.el b/helm-files.el index 87900e31a2..f3e4ef6f10 100644 --- a/helm-files.el +++ b/helm-files.el @@ -7124,30 +7124,33 @@ and (git-project (helm-aif (and (require 'helm-ls-git nil t) (fboundp 'helm-ls-git-root-dir) (helm-ls-git-root-dir)) - (expand-file-name it))) + it)) ;; handle nested projects (Hg inside Git or vice versa) issue#2723. (hg-project (helm-aif (and (require 'helm-ls-hg nil t) (fboundp 'helm-hg-root) (helm-hg-root)) - (expand-file-name it))) + it)) (project-type (cond ((and git-project (not hg-project)) 'Git) ((and hg-project (not git-project)) 'Hg) ((and hg-project git-project) - (if (string-prefix-p git-project hg-project) 'Hg 'Git)) + (if (string-prefix-p + (expand-file-name git-project) + (expand-file-name hg-project)) + 'Hg 'Git)) (t nil)))) (cl-flet ((push-to-hist (root) (setq helm-browse-project-history (cons root (delete root helm-browse-project-history))))) (helm-acond ((equal project-type 'Git) - (push-to-hist it) + (push-to-hist git-project) (helm-ls-git)) ((equal project-type 'Hg) - (push-to-hist it) + (push-to-hist hg-project) (helm-hg-find-files-in-project)) ((helm-browse-project-get--root-dir (helm-current-directory)) (if (or arg (gethash it helm--browse-project-cache)) (progn - (push-to-hist it) + (push-to-hist (abbreviate-file-name it)) (helm-browse-project-find-files it (equal arg '(16)))) (helm :sources (helm-browse-project-build-buffers-source it) :buffer "*helm browse project*")))))))