From 004da420e5f67b868d0a35e8cfe5ae77cad1aca8 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 29 Jul 2018 13:06:32 -0400 Subject: [PATCH] Match trailing slash in FugitivePath() --- autoload/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 0bb11ba..dfd065d 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -438,6 +438,9 @@ function! fugitive#Path(url, ...) abort return fugitive#Real(a:url) endif let url = s:shellslash(fnamemodify(a:url, ':p')) + if url =~# '/$' && s:shellslash(a:url) !~# '/$' + let url = url[0:-2] + endif let dir = a:0 > 1 ? a:2 : get(b:, 'git_dir', '') let tree = s:Tree(dir) let [argdir, commit, file] = s:DirCommitFile(a:url)