Repository navigation
Clear the remaining nullability analyzer findings - #588
Merged
hannesa2 merged 2 commits intoAug 23, 2026
Merged
Conversation
Say where a result can be absent, and stop building a ref out of a name that is not there. - Declare the file diff as absent, which is what the callers in the commit view already receive when the diff task fails - Return no head ref when the resolved branch has no name, rather than wrapping the missing name in a ref that cannot describe anything Neither call site was reachable in normal use, but both told the analyzer something the code does not honour, which hides the findings that matter.
Stop naming the menus and the menu item the tests build, since nothing reads those names. - Leave the fixture titles empty so the analyzer stops treating them as text shown to a user The tests tell the staged menu from the unstaged one by identity, not by name, so the titles carried no meaning and only tripped the localizability check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Say plainly that these two seams can come back empty, so the analyzer
stops reporting nulls that the callers already cope with.
once the diff task fails
instead of building a ref out of a name that is not there
The head ref is the one behavior change: it now returns nothing where
it used to hand back a ref built from a missing name, and it differs
only once that lookup has already failed.
A second, cosmetic commit empties three fixture titles in the file
selection tests, so the localizability check stops flagging text that
no user ever sees.
Test plan:
xcodebuild test -only-testing:GitXTestsis green, 41/41ref guard only adds an early return where the lookup already failed