eslint-plugin-diff icon indicating copy to clipboard operation
eslint-plugin-diff copied to clipboard

Fix handling of explicit references to baseline commit

Open Penguinwizzard opened this issue 11 months ago • 1 comments

In cases where ESLINT_PLUGIN_DIFF_COMMIT is a commit hash, it would get prefixed with "origin/" to generate a string that does not resolve as a git ref. A similar operation would happen with a namespace-qualified ref - refs/heads/origin/main -> origin/refs/heads/main also yields a string that doesn't function as a ref.

This changes to detect cases where the provided ref is more explicit, and disables the origin/ prefixing in those cases.

Penguinwizzard avatar Feb 07 '25 02:02 Penguinwizzard

/cc @paleite

mohamedmansour avatar Feb 07 '25 15:02 mohamedmansour