motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 1d00a7392bda3ed337358b867f8a102c8a78a55c (tree)
parent 054fca2269b33285b3e6a1014a3ceabae5af11bc
Author: Tim Pope <code@tpope.net>
Date:   Tue, 13 Apr 2021 09:04:38 -0400

Fix :GBrowse :/ in bare repositories

Diffstat:
Mautoload/fugitive.vim | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -6164,7 +6164,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo let expanded = '.git/refs/' . subdir . expanded endif endfor - let full = fugitive#Find(expanded, dir) + let full = s:Generate(expanded, dir) let commit = '' if full =~? '^fugitive:' let [dir, commit, path] = s:DirCommitFile(full) @@ -6174,6 +6174,8 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo if commit =~ '..' let type = s:TreeChomp(['cat-file','-t',commit.s:sub(path,'^/',':')], dir) let branch = matchstr(expanded, '^[^:]*') + elseif empty(path) || path ==# '/' + let type = 'tree' else let type = 'blob' endif