Repository navigation
Fix the recents list failing silently, and find Homebrew's git on Apple Silicon - #616
Merged
Merged
Conversation
goneng
force-pushed
the
fix-silent-failure-from-recents
branch
from
September 13, 2026 04:40
a299c3e to
b2e6ca3
Compare
Picking a repository in the Open Recent window handed the document controller an empty completion handler, so a repository that could not be opened took the window down and put nothing in its place, while the same repository opened from the File menu says what went wrong. * Report the error the document controller hands back, the way the application delegate already does for files opened from the Finder * Open the selection in one place rather than once per key and once per double click
The search locations were written before Apple Silicon and name every prefix but /opt/homebrew, so a Mac whose /usr/bin/git refuses to run until the Xcode licence is accepted has no git GitX will accept, even with a working one installed. * Look in /opt/homebrew/bin ahead of the older prefixes, since that is where Homebrew installs on Apple Silicon * The error the user is shown lists these locations, so it now names the one they are most likely to have
goneng
force-pushed
the
fix-silent-failure-from-recents
branch
from
September 13, 2026 06:43
b2e6ca3 to
7b7a6ce
Compare
Contributor
goneng
marked this pull request as ready for review
September 13, 2026 07:24
hannesa2
approved these changes
Sep 13, 2026
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.




Fixes #603, which is two separate faults.
The recents popup swallowed the error. Both call sites handed
openDocumentWithContentsOfURL:display:completionHandler:an emptycompletion handler, and that method leaves presentation to the caller, so
a repository that failed to open took the popup down and put nothing in
its place. The same repository opened from the File menu says what went
wrong, which is the asymmetry in the report.
/opt/homebrew/bin/gitwas not searched. The list predates AppleSilicon: MacPorts, Fink,
/usr/local,~/bin,/usr/bin, but not theprefix Homebrew uses on ARM. With
/usr/bin/gitrefusing to run until theXcode licence is accepted, there was nothing left to find. The error the
user is shown is built from that same list, so it now names it too.
Test plan
make unit-test: 68 tests, 0 failures, 5 of them newtestTheHomebrewPrefixesAreBothSearchedfails without the added path, and the recents test fails when the
completion handler is put back the way it was
.gitaside so the recents entry no longer resolves: before, selectingit opened nothing and said nothing; now it shows the same alert as the
File menu
I could not stage the reporter's actual trigger, since
/usr/bin/gitisprotected and cannot be made to fail a licence check, so the discovery
half rests on the code and the test. An artifact from this PR would let
@johndouthat confirm it on the machine that has the problem.