howardroark / pollinate

Template your base files and generate new projects from Git(Hub).
The Unlicense
225 stars 16 forks source link

Simplifying template source check #40

Closed howardroark closed 7 years ago

howardroark commented 7 years ago

@jedwards1211 I'm moving this here from the other PR. Could you explain it here a little more.

Thanks!

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.07%) to 77.707% when pulling a27680c7d7b9185973fe8695706d7af58efd53d0 on patch/init-git-match into 1fa2745537363b2b0d5c99b7cea880abfa683119 on develop.

jedwards1211 commented 7 years ago

You know, I should make it more general than just checking for git@github.com. From git help clone:

  An alternative scp-like syntax may also be used with the ssh protocol:
  * [user@]host.xz:path/to/repo.git/
jedwards1211 commented 7 years ago

I assume it's not possible to clone private repos via https://github.com, and one has to use git@github.com:... or ssh:// URLs. But I could be wrong.

jedwards1211 commented 7 years ago

Considering the variety of URLs git accepts, I think it might be best to assume anything that isn't a GitHub URL or directory is a git URL and let git error out if it's invalid.

howardroark commented 7 years ago

Yeah https works with git cli. That check already accounts for those cases.

Though yeah... it kinda makes sense to just treat everything as git url after the first two checks.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 77.994% when pulling 7cb7bbe70807bf57be74f59018d3b862d0c3fae6 on patch/init-git-match into 4f810c3ef3e4dad505abf681e11a2ed996d61d22 on develop.

jedwards1211 commented 7 years ago

Yeah, looks good to me

howardroark commented 7 years ago

Works pretty well :)