fsprojects / ProjectScaffold

A prototypical .NET solution (file system layout and tooling), recommended for F# projects
http://fsprojects.github.io/ProjectScaffold
The Unlicense
515 stars 154 forks source link

Clear git history when cloned via ssh or https #314

Closed chrishannaby closed 6 years ago

chrishannaby commented 6 years ago

Fixes https://github.com/fsprojects/ProjectScaffold/issues/276. When the ProjectScaffold repo has been cloned via ssh or https the "Initialise git repo" step does not work correctly. This is because the check performed to see if the remote matches the ProjectScaffold repo only tests for the following remote url format:

http://github.com/fsprojects/ProjectScaffold.git

This fix adds support for the additional remote url formats:

https://github.com/fsprojects/ProjectScaffold.git

and

git@github.com:fsprojects/ProjectScaffold.git

to correctly handle when the repo has been cloned by https or ssh.

pblasucci commented 6 years ago

I'm going to merge this because it looks solid to me... but someone who understands these things a bit better should really look into why the CI keeps getting access violations. :-(