Files
codeg/src-tauri
xintaofei cc79d62b27 fix(git): surface non-git-repo as a typed error and align all panels via workspace state
Consolidate `.git` presence detection into a shared `git_repo` module used by both the workspace state watcher and the command preflight helper, replacing duplicated local definitions.

Introduce `AppErrorCode::NotAGitRepository` (HTTP 422) and preflight eleven frontend-callable git commands (log, status, list-branches, diff, diff-with-branch, show-diff, show-file, push-info, list-remotes, list-all-branches, commit-branches) so non-git folders short-circuit with a structured error instead of leaking locale-dependent git stderr.

Frontend `isNotAGitRepoError` checks the error code first and falls back to a multi-language regex list centralized in `src/i18n/git-error-patterns.ts`, covering the nine languages git actually translates into.

Wire the git log panel to `workspaceState.isGitRepo` rather than a local cached flag, so running `git init` or deleting `.git` externally propagates through the watcher and refreshes the panel automatically.
2026-04-18 23:07:13 +08:00
..
2026-03-31 13:44:23 +08:00
2026-03-22 13:57:07 +08:00
2026-03-06 22:56:13 +08:00
2026-03-29 18:36:30 +08:00
2026-04-18 18:55:26 +08:00
2026-04-18 18:55:26 +08:00
2026-04-18 18:55:26 +08:00