Skip to content

Search (git grep) does not handle long lines #42

@beyang

Description

@beyang

Because go-vcs uses bufio.Scanner to read lines from git output (see the Search method in vcs/gitcmd/repo.go), it fails on super long lines.

It should more gracefully handle this error or use bufio.Reader.ReadLine.

Repro: try searching for "foo" in the repository github.com/treeio/treeio (this returns some long lines of minified JSON).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions