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 9ce67cdc934fcccaa09209c61be0fe312a6290c7 (tree)
parent bf042610806a35c9a7fb2eb705734c7ef3be33d0
Author: Tim Pope <code@tpope.net>
Date:   Sat, 26 Dec 2015 15:09:08 -0500

Always pass commit SHA to :Gbrowse handlers

Diffstat:
Mplugin/fugitive.vim | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -2215,6 +2215,9 @@ function! s:Browse(bang,line1,count,...) abort if type ==# 'tree' && !empty(path) let path = s:sub(path, '/\=$', '/') endif + if empty(commit) && path !~# '^\.git/' + let commit = s:repo().rev_parse('HEAD') + endif if path =~# '^\.git/.*HEAD' && filereadable(s:repo().dir(path[5:-1])) let body = readfile(s:repo().dir(path[5:-1]))[0] if body =~# '^\x\{40\}$'