Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git: ensure file-looking git refs aren't parsed as URLs #4776

Merged
merged 1 commit into from
Mar 18, 2024

Commits on Mar 18, 2024

  1. git: ensure file-looking git refs aren't parsed as URLs

    URLs that look like `./path/to/file` and `../path/to/file` definitely
    aren't git URLs - so we should bail out early.
    
    This was causing a weird issue where if you copied `./.git` this would
    be detected as a valid url parsing with `host = "."` and `path = "/git"`.
    The fix for this is to make sure that for these explicit file-like
    paths, we *never* parse them as url-refs.
    
    Also some tests to make sure this doesn't break again!
    
    Signed-off-by: Justin Chadwell <[email protected]>
    jedevc committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    95ca25e View commit details
    Browse the repository at this point in the history