diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2024-03-02 05:41:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-02 08:41:56 -0500 |
| commit | f7ae06a5f1e6943d4a78c8ede313ecd89c8563db (patch) | |
| tree | c4f29e4ffaca62c65015acfab6f4a657b32e03cd /src/handlers/diff_header.rs | |
| parent | 037665ba37593665e5566fee8ac580ef6bbb170a (diff) | |
Parse filename unambiguously using color escape sequences (#1634)
* Simplify handle_grep_line via early return
Rather than indenting the entire body of the function twice, return
early if the conditions aren't met.
* Parse filename unambiguously using color escape sequences
`git grep`, by default, emits ANSI color escape sequences around the
filename, separator, and line number. Parse these if available.
This currently assumes the default colors, and will fall back to the
previous parsing if any of the colors have been changed.
Add tests for filenames that previously failed to parse correctly.
Diffstat (limited to 'src/handlers/diff_header.rs')
0 files changed, 0 insertions, 0 deletions
