From cfbaa27d11f38b739cb31eb954d4f9fb8378dc50 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 24 Apr 2019 13:17:39 -0400 Subject: [PATCH] Fix :Gstatus log with unpushed remote --- autoload/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index fd5eade..27a3277 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1350,6 +1350,9 @@ endfunction function! s:QueryLog(refspec) abort let lines = split(system(FugitivePrepare('log', '-n', '256', '--format=%h%x09%s', a:refspec, '--')), "\n") + if v:shell_error + return [] + endif call map(lines, 'split(v:val, "\t")') call map(lines, '{"type": "Log", "commit": v:val[0], "subject": v:val[-1]}') return lines