composer-lock-diff
composer-lock-diff copied to clipboard
Git show does not expect windows directory separator
https://github.com/davidrjonas/composer-lock-diff/blob/817bb8f7e9177c87947e2e067e138ca93e8a4681/composer-lock-diff#L185
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 / ?
I'm going to have to read more about how git works with windows paths before I can make a call here. Is it just the case that git always uses unix path separators and that building $fileish again with / explicitly in the git show case would cover it?
Looks like. Providing paths manually with / instead of guessed \ helps