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

7.0.0+ unexpected breaking change: git:// URLs are no longer supported #46

Closed
nbouvrette opened this issue Jul 13, 2022 · 4 comments
Closed

Comments

@nbouvrette
Copy link

This issue is related to these two issues:

I am not sure if the issue has been caused by this repo or by https://github.com/IonicaBizau/parse-path

If this is by this repo, I suspect this new regular expression might be the cause:

const GIT_RE = /((git@|http(s)?:\/\/)([\w\.@]+)(\/|:))(([\~,\w,\-,\_,\/]+)(.git){0,1}((\/){0,1}))/

But in a nutshell, before you did many changes to many of your repositories, this URL: git://github.com:user/repo resolved to this:

{
  protocols: [ 'git' ],
  protocol: 'ssh',
  port: null,
  resource: 'github.com',
  user: '',
  pathname: '/user/repo',
  hash: '',
  search: '',
  href: 'git://github.com:user/repo',
  query: [Object: null prototype] {},
  token: '',
  toString: [Function (anonymous)],
  source: 'github.com',
  git_suffix: false,
  name: 'repo',
  owner: 'user',
  commit: undefined,
  ref: '',
  filepathtype: '',
  filepath: '',
  organization: 'user',
  full_name: 'user/repo'
}

After your changes it now resolves to this:

{
  protocols: [ 'file' ],
  protocol: 'file',
  port: '',
  resource: '',
  user: '',
  password: '',
  pathname: '',
  hash: '',
  search: '',
  href: 'git://github.com:user/repo',
  query: {},
  token: '',
  toString: [Function (anonymous)],
  source: '',
  git_suffix: false,
  name: 'repo',
  owner: 'git://github.com:user',
  commit: undefined,
  ref: '',
  filepathtype: '',
  filepath: '',
  organization: 'git://github.com:user',
  full_name: 'git://github.com:user/repo'
}
@IonicaBizau
Copy link
Owner

@nbouvrette I am checking this now. I guess it should be git://github.com/user/repo (/ instead of :).

Consider that github.com accepts usernames made of numbers, so this happens:

$ git clone -v git://github.com:42/42-bootstrap.git
Cloning into '42-bootstrap'...
warning: templates not found in /home/ionicabizau/.git-templates
Looking up github.com ... done.
Connecting to github.com (port 42) ... ^C

Should I may miss anything, do let me know. 😁

@mhassan1
Copy link

mhassan1 commented Jul 27, 2022

@IonicaBizau I just wanted to confirm: is this a breaking change that won't be restored?

@IonicaBizau
Copy link
Owner

@mhassan1 Like commented above, I don't see any case where we would use git://domain.com:path/name. Does git itself support such URLs?

@mhassan1
Copy link

Makes sense. It seems like git doesn't support it. I think I was just misunderstanding your concluding comment. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants