From 593f831d6f6d779cbabb70a4d1e6b1b1936a88af Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 19 Jun 2025 14:30:42 -0400 Subject: [PATCH] Fix interpretation of :% when % is absolute We're trying to support two different Git syntaxes here that were never meant to be mixed. We want :/foo/bar to be interpreted as the pathspec :(top)foo/bar, but we want :% to be interpreted as the % file in the index, even when % is /foo/bar. Resolves: https://github.com/tpope/vim-fugitive/issues/2404 --- autoload/fugitive.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 1cbc2eb..d8f51e5 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2071,6 +2071,8 @@ function! s:Expand(rev, ...) abort endif elseif s:Slash(a:rev) =~# '^\a\a\+://' let file = substitute(a:rev, '\\\@