Skip to content

searcher: handle empty diff output

Administrator requested to merge k/uneven-pairas into main

Created by: keegancsmith

Empty output from git diff lead to the error message uneven pairs. This is since bytes.Split on empty output returns [][]byte{{}}. Additionally added debug logging which would include the raw output. We expect this error to not trigger, so this raw output would help debugging.

Test Plan: Adjusting unit tests are a bit difficult at the moment, so I relied on manual testing. I did a search on the default branch, but by directly naming it so that searcher was used. After this commit it works. For example

repo:^github\.com/sourcegraph/scip$@main UnspecifiedSymbolRole

Merge request reports

Loading