Skip to content

Git show does not expect windows directory separator #21

@scaytrase

Description

@scaytrase

exec('git show '. escapeshellarg($fileish), $lines, $exit);

git show called here does not expect DIRECTORY_SEPARATOR in path. It always expect linux style separators (in general these starts to be revision notation, not a paths at all

So when I just call composer-lock-diff or composer-lock-diff --from="HEAD:.\composer.lock" it gives me

Error: contents from HEAD:.\composer.lock does not decode as json

If I manually provide it --from="HEAD:./composer.lock" it works well.

So I hope when play comes to git show we should forcibly replace directory separators to / ?

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