Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork941
Store submodule name#679
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for your contribution! At this time I unfortunately also don’t know if there are better ways to fix this, but believe it’s OK to assume it’s not making anything worse if the tests are not breaking. |
After trying a few things locally, this seemed to allow the submodule to behave normally. Though would think the name should be coming from
Sorry. Should have included a test. TBH wasn't sure if this seemingly hacky fix would be accepted or so quickly. 😄 Thanks for that. I'll give the test some thought. |
Uses a workaround already accepted upstream to fix `create_submodule`when the submodule already exists. In particular naming the submodulewith the user provided name. By being able to use `create_submodule`,this script runs substantially faster than when calling `submodule`.Reason being calling `submodule` lists all submodules in the repo andthen selects the one we named. Whereas `create_submodule` simplyprovides us the requested submodule. So using this workaround isnecessary for the performance improvement it provides.ref:gitpython-developers/GitPython#679
…_submoduleStore submodule name
Fixes#678
Seems there are a plethora of things that expect to be able to get a submodule's name. However it is not defined if
Submodule.add
finds the submodule already exists. This is one attempt at trying to solve this issue.