nvim: autoload/git: Use diff instead of difftool
This commit is contained in:
parent
f0ad084c84
commit
6dd369b137
|
@ -109,13 +109,13 @@ function! git#git_cherry_pick_range() abort
|
|||
silent execute "bw"
|
||||
endfunction
|
||||
|
||||
" Run Git difftool on the commit in the line which we are at. To be used after
|
||||
" Run Git diff on the commit in the line which we are at. To be used after
|
||||
" running some variation of Git log.
|
||||
function! git#git_diff_commit() abort
|
||||
" A line in Git log is of the form commit <SHA>
|
||||
let line = trim(getline('.'))
|
||||
let commit = split(line, " ")
|
||||
execute "Git difftool -y " . commit[1] . " " . commit[1] . "~1"
|
||||
execute "Gtabedit | Git diff " . commit[1] . " " . commit[1] . "~1 | only"
|
||||
endfunction
|
||||
|
||||
" To be used after running some variation of Git log.
|
||||
|
@ -162,7 +162,7 @@ function! git#git_log_named_block() abort
|
|||
endfunction
|
||||
|
||||
" Compares current branch against master. For eg. git log master..current.
|
||||
" This combined with Git difftool -y are helpful for MR reviews.
|
||||
" This combined with Git diff are helpful for MR reviews.
|
||||
function! git#git_log_compare() abort
|
||||
let default = split(trim(system('git symbolic-ref refs/remotes/origin/HEAD')), '/')
|
||||
let current = trim(system('git branch --show-current'))
|
||||
|
|
Loading…
Reference in New Issue