Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork962
Fix submodules listing error#818
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
Byron commentedDec 24, 2018
Thanks a lot for the contribution and the test. I will be happy to merge after some clarification. Could you have a look at the test that actually wants the ‘InvavalidGitRepository’ exception? It causes travis to fail consistently. Maybe that usecase is now obsolete by the new behaviour, which is when the test can be adjusted to claim that ‘nothing should happen’ if the submodule is invalid. Maybe that test, however, could also show that the ‘InvalidGitRepository’ error should rather be cought in the spot that interests you in particular, for example, when listing submodules, instead of removing it entirely. |
stsewd commentedDec 24, 2018
Sorry I didn't comment yesterday, I was trying to solve that failing test but some tests are not passing locally (master), need to figure out that first. |
stsewd commentedDec 24, 2018
I'm not following, sorry. Do you mean to keep the exception and passing the failed submodule as an attribute? |
Byron left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I left a few comments were they matter, maybe this helps to understand what I mean. If anything remains unclear, please let me know.
| entry=index.entries[index.entry_key(p,0)] | ||
| sm=Submodule(repo,entry.binsha,entry.mode,entry.path) | ||
| exceptKeyError: | ||
| raiseInvalidGitRepositoryError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is there a way for this Exception to stay, just as there is a test that expects this behaviour (see the test-failure on travis).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
If we do that, we wouldn't be able to keep listing the submodules here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@stsewd I think all that's left before the merge is to fix the now failing test. It could be changed to now expect to no failure and to see a listing of the existing submodules - if you think there is not too much overlap with the test you added.
Uh oh!
There was an error while loading.Please reload this page.
stsewd commentedJan 6, 2019
Also, reading the test looks like the code is doing what we want to avoid GitPython/git/test/test_submodule.py Lines 482 to 489 in8b3ffcd
The tests are expecting to raise an exception if it can't find the correct path of the submodule, while git just list the valid ones. |
codecov-io commentedFeb 2, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #818 +/- ##==========================================+ Coverage 94.67% 94.68% +<.01%========================================== Files 59 59 Lines 9393 9399 +6 ==========================================+ Hits 8893 8899 +6 Misses 500 500
Continue to review full report at Codecov.
|
stsewd commentedFeb 2, 2019
I just updated the test, sorry for the long wait. Now py37 is failing, but doesn't look related to this change. |
stsewd commentedJun 25, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@Byron tests are passing now, any change to get this merged? Thank you! Appveyor is failing in master (isn't triggering for this PR I think), though |
Currently we show a generic message.Related:readthedocs#4371This can be removed whengitpython-developers/GitPython#818gets merged.
Byron commentedJul 20, 2019
Sorry for the wait, and thanks a lot for the fixes! |
Fix#279
When the path doesn't exist, gitpython throws an error, this usually happens when the user deletes the submodule directory but not the submodule entry in
.gitmodules.