From 5c39cde2024a4c9da489ec47fc8ea34340897207 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 23 Aug 2021 02:58:35 -0400 Subject: [PATCH] Don't match git grep "BUG:" lines as filename Found this playing around with git grep --no-index /absolute/path. --- autoload/fugitive.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 12d96f9..0ab68ea 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -5198,13 +5198,13 @@ function! s:GrepParseLine(options, quiet, dir, line) abort endif let entry = {'valid': 1} let match = matchlist(a:line, '^\(.\{-\}\):\([1-9]\d*\):\([1-9]\d*:\)\=\(.*\)$') - if len(match) + if a:line =~# '^git: \|^usage: \|^error: \|^fatal: \|^BUG: ' + return {'text': a:line} + elseif len(match) let entry.module = match[1] let entry.lnum = +match[2] let entry.col = +match[3] let entry.text = match[4] - elseif a:line =~# '^git: \|^usage: \|^error: \|^fatal: ' - return {'text': a:line} else let entry.module = matchstr(a:line, '\CBinary file \zs.*\ze matches$') if len(entry.module)