Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Conversation

@msfjarvis
Copy link
Member

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Always enforce leading slash since relative URLs are not always correct.

💡 Motivation and Context

An example of the case that should work but doesn't is /mnt/foo/pass-repo with default SSH port will have the leading / resulting in the path becoming mnt/foo/pass-repo that gets resolved as relative from $HOME which is obviously wrong.

💚 How did you test it?

Tested manually with the following configuration

  • custom port, path in $HOME
  • default port, path in $HOME
  • custom port, path in /mnt/
  • default port, path in /mnt/

📝 Checklist

  • I formatted the code with the IDE's reformat action (Ctrl + Shift + L/Cmd + Shift + L)
  • I reviewed submitted code

🔮 Next steps

T E S T S!

📸 Screenshots / GIFs

@msfjarvis
Copy link
Member Author

Ugh this is a complicated situation. Everything works with local repos but as the failing tests suggest, remote URLs aren't really working out without sticking a leading slash into the URL.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis force-pushed the bug/relative-urls branch from 0714ed2 to 55c4902 Compare May 24, 2020 10:19
@msfjarvis msfjarvis merged commit f1befcf into master May 24, 2020
@msfjarvis msfjarvis deleted the bug/relative-urls branch May 24, 2020 10:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Git cloning over ssh uses the wrong repo path

3 participants