Skip to content

Avoid crash when the git command to obtain branches fails #4547

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stefanhaller
Copy link
Collaborator

  • PR Description

In #4546 a user reported a crash in refresh when the repository is corrupt. It would be good not to crash, but to handle this gracefully. This PR does that.

However, this is probably not a good enough solution, because we only log the error (in RefreshHelper.refreshBranches) and don't communicate it otherwise to users. This is true for all errors that happen during refresh, though.

It is unclear how we could report refresh errors to users; showing them in a popup doesn't seem right. As long as we don't have a solution for this, it might actually be better to crash, so that users can file an issue and we tell them how to sort it out. Leaving as draft for the time being.

This is probably not a good enough solution, because we only log the error (in
RefreshHelper.refreshBranches) and don't communicate it otherwise to users. This
is true for all errors that happen during refresh, though.
@stefanhaller stefanhaller added the bug Something isn't working label May 9, 2025
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for e6bd9d01 62.50%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e6bd9d0) Report Missing Report Missing Report Missing
Head commit (c5a2a56) 56008 48624 86.82%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4547) 8 5 62.50%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant