check for different urls when running `haxelib git`
Currently running haxelib git it doesn't check the differences in remote urls.
Running haxelib git flixel https://github.com/HaxeFlixel/flixel.git will correctly install flixel. However, if you then try running with a different url haxelib git flixel https://github.com/FunkinCrew/flixel.git it doesn't properly update / reinstall from the new URL. Going into the cloned repo flixel/git and running git config --get remote.origin.url will show https://github.com/HaxeFlixel/flixel.git rather than the new one.
This PR runs a check from the currently installed haxelib's git remote to the newly inputted one, and if it's different, it will ask if you want to install the new one.
Right now I just have it implemented for git, not mecurial. Current implementation is agnostic to whether someone has an SSH remote url ([email protected]:HaxeFlixel/flixel) or HTTP remote url (https://github.com/HaxeFlixel/flixel)
how was this one looking? Should I add tests for this?
how was this one looking? Should I add tests for this?
Yes please, a test would be useful!
finally got around to figuring out how to draft up a test!
I wrote it in TestInstaller.hx rather than TestGit.hx since the url checking logic was in Installer.hx.
how does the PR look @tobil4sk ?