Skip to content

Conversation

@smith-doug
Copy link

ls-remote --get-url will apply any special insteadOf rules. This prevents false "Path already exists and contains a different repository" errors if you have something like the below in your gitconfig.

[url "[email protected]:"]
    insteadOf = https://github.com/

@christophebedard
Copy link
Contributor

Would probably be good and easy enough to add a test here: https://github.com/dirk-thomas/vcstool/blob/master/test/test_commands.py

Not available in 3.5
@smith-doug
Copy link
Author

Ty for reminding me about tests. The extra output I added broke them. Will update.

Additional output breaks tests
Git doesn't make it easy to override the location of the global gitconfig file.  Maybe I should just write the .gitconfig directly, to avoid any chance over overwriting the user's gitconfig

https->ssh would be more annoying as then you have to deal with ssh keys, making sure they exist, unlocking, etc.
Avoid any potential shell issues that might result in the user's real .gitconfig being touched.
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

Successfully merging this pull request may close these issues.

2 participants