fix: Resolve git operation error handling and conflict detection issues

This commit is contained in:
gsxdsm
2026-02-18 23:03:39 -08:00
parent 205f662022
commit a144a63c51
8 changed files with 50 additions and 17 deletions

View File

@@ -658,7 +658,11 @@ export function GitDiffPanel({
}, [worktreePath, projectPath, useWorktrees, enableStaging, files, executeStagingAction]);
const handleUnstageAll = useCallback(async () => {
const allPaths = files.map((f) => f.path);
const stagedFiles = files.filter((f) => {
const state = getStagingState(f);
return state === 'staged' || state === 'partial';
});
const allPaths = stagedFiles.map((f) => f.path);
if (allPaths.length === 0) return;
if (enableStaging && useWorktrees && !worktreePath) {
toast.error('Failed to unstage all files', {