Treat . remote as origin in :Gbrowse

This commit is contained in:
Tim Pope
2011-08-29 20:56:21 -04:00
parent ef4bcdb44f
commit 1de030e2d0

View File

@@ -1605,7 +1605,7 @@ function! s:Browse(bang,line1,count,...) abort
endif endif
if branch != '' if branch != ''
let remote = s:repo().git_chomp('config','branch.'.branch.'.remote') let remote = s:repo().git_chomp('config','branch.'.branch.'.remote')
if remote ==# '' if remote =~# '^\.\=$'
let remote = 'origin' let remote = 'origin'
elseif rev[0:strlen(branch)-1] ==# branch && rev[strlen(branch)] =~# '[:^~@]' elseif rev[0:strlen(branch)-1] ==# branch && rev[strlen(branch)] =~# '[:^~@]'
let rev = s:repo().git_chomp('config','branch.'.branch.'.merge')[11:-1] . rev[strlen(branch):-1] let rev = s:repo().git_chomp('config','branch.'.branch.'.merge')[11:-1] . rev[strlen(branch):-1]