Skip to content

🐛 --color-words output doesn't show hunk headers or line numbers #829

@dandavison

Description

@dandavison

From #826 (comment)

the handling of --color-words is not quite what I had expected in v0.10.3 either. I suppose it makes sense given that delta is only passing along the raw values, but for a file with multiple hunks, I'm not getting either line numbers from delta or the hunk headers from the raw git.

It looks like the implementation in #807 isn't quite right: it's causing the hunk lines to be emitted raw by not handling them. But I think that what is needed is more complex: to transition into one of the hunk line states of the state machine, emit raw instead of the normal emission, and report the line as having been handled. I think that this is because we are not transitioning the state correctly

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