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

Support git insteadOf config entries during import #267

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

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 "git@github.com:"]
    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