Repository navigation
Fix the git path fallback freezing launch when validation fails - #766
Merged
Merged
Conversation
goneng
force-pushed
the
keep-the-git-path-until-a-fallback-is-found
branch
2 times, most recently
from
October 24, 2026 07:36
0382ba7 to
09c55b0
Compare
Run the default git search off the main thread and keep the configured path until a replacement is found, so a failed background check no longer blocks the UI or leaves the git path nil while the search runs. - Search for a default git binary on the background queue without touching the shared state - Switch to the binary found and show the alert on the main thread - Keep the configured path when no fallback is found - Build the search locations list once, as it is now read off the main thread - Log which binary replaced the configured one Refs #744
goneng
force-pushed
the
keep-the-git-path-until-a-fallback-is-found
branch
from
October 24, 2026 10:19
09c55b0 to
8591c8b
Compare
This was referenced Oct 24, 2026
Collaborator
Author
goneng
marked this pull request as ready for review
October 24, 2026 17:55
hannesa2
approved these changes
Oct 24, 2026
hannesa2
left a comment
Contributor
There was a problem hiding this comment.
Conclusion: A good, targeted concurrency fix that correctly addresses the root cause of the UI freeze and is consistent with the existing code. I would merge it.
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.
Run the default git search off the main thread and keep the configured path until a replacement is found, so a failed background check no longer blocks the UI or leaves the git path nil while the search runs.
This continues #748 for #744, which was reported again on 1.7.1. This PR alone does not fix #744 and does not close it. Manual testing found the likely root cause: a race in
PBTaskthat sometimes returns empty output for a successfulgit --versionwhen many instances start at once. That is fixed separately in #774. This PR remains useful on top of it: a configured path that fails validation no longer blocks startup, and falls back to a working git.Refs #744, see also #774
Test plan (run on the CI arm64 build of this branch):
-gitExecutablepointing at a script that exits 1: the log shows the failed validation and the binary used instead (/opt/homebrew/bin/git), the alert is shown, the app stays usable-gitExecutablepointing at a script that sleeps 8 s before running git: the UI is responsive during the wait, and no alert appearsgit --versionoutput now fixed in Fix commands sometimes returning empty output when many run at once #774