mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 05:13:53 -05:00
Simplify conditional around :GBrowse line number computation
This is solely to improve the readability of upcoming diffs.
This commit is contained in:
@@ -7369,11 +7369,9 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, ...) abor
|
||||
let line1 = a:count > 0 && type ==# 'blob' ? a:line1 : 0
|
||||
let line2 = a:count > 0 && type ==# 'blob' ? a:count : 0
|
||||
if empty(commit) && path !~# '^\.git/'
|
||||
if a:count < 0 && !empty(merge)
|
||||
if a:count < 0
|
||||
let commit = merge
|
||||
else
|
||||
let commit = ''
|
||||
if len(merge)
|
||||
elseif len(merge)
|
||||
let owner = s:Owner(@%, dir)
|
||||
let commit = s:ChompDefault('', ['merge-base', 'refs/remotes/' . remote . '/' . merge, empty(owner) ? '@' : owner, '--'], dir)
|
||||
if line2 > 0 && empty(arg) && commit =~# '^\x\{40,\}$'
|
||||
@@ -7393,7 +7391,6 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, ...) abor
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if empty(commit)
|
||||
let commit = readfile(fugitive#Find('.git/HEAD', dir), '', 1)[0]
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user