Skip to content

Fix a spurious invalid git path alert at login - #748

Merged
hannesa2 merged 1 commit into
masterfrom
fix/git-path-startup-validation
Oct 3, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
fix/git-path-startup-validation

Conversation

@goneng

@goneng goneng commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Validate the configured git path in the background, so a transient failure of the /usr/bin/git shim at login no longer blocks launch or raises a false "Invalid git path" alert.

  • Trust an executable configured path immediately and run --version off the main thread
  • On failed validation, log it, fall back to the default search and show the alert
  • Log launch errors and unparseable --version output instead of dropping them
  • Move the default search and the alert into their own methods

+[PBGitBinary version] is nil until validation finishes; callers already handle nil (worktree actions show "Requires git X or later" briefly).

The root cause is unconfirmed: the likely culprit is the Command Line Tools shim failing early in login. The new logging should show it if it recurs.

Fixes #744

Test plan:

  • Launch with a good path (-gitExecutable /usr/bin/git): no alert, repo opens
  • Launch with an invalid binary (/usr/bin/true): logged, falls back to default search, alert shown
  • Launch with a missing path: alert shown immediately, as before

Validate the configured git path in the background so a 
transient failure of the `/usr/bin/git` shim at login 
no longer blocks launch or raises a false alert.

- Trust an executable configured path at once and run `--version` off the main thread
- On failed validation, log it, fall back to the default search and show the alert
- Log launch errors and unparseable `--version` output instead of dropping them
- Move the default search and the alert into their own methods

Fixes #744
@goneng
goneng force-pushed the fix/git-path-startup-validation branch from b2314ef to 43f6ab3 Compare October 3, 2026 00:40
@goneng
goneng marked this pull request as ready for review October 3, 2026 05:26
@goneng
goneng requested a review from hannesa2 October 3, 2026 05:27
@goneng goneng added the bugfix label Oct 3, 2026
@hannesa2
hannesa2 merged commit 1a49bb4 into master Oct 3, 2026
3 checks passed
@hannesa2
hannesa2 deleted the fix/git-path-startup-validation branch October 3, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git path warning dialog on startup

2 participants