Skip to content

🐛 git grep output incorrect for files with hyphen in path #2144

Description

@ahumeau

Hi,

I have an issue very similar to #974 but more general: whenever I use git grep and a file with a path that contains an hyphen is matched, the output is incorrect, the hyphen is replaced by a colon.

To reproduce:

mkdir /tmp/delta-test
cd /tmp/delta-test
echo content > foo-bar
git init
git add .
git commit -m 'Initial'
git grep content

The git --no-pager output is foo-bar:content.

The git delta output is foo:bar:content

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions