[PR #466] fix(vscode): Use git repository root instead of workspace folder for … #490

Closed
opened 2026-03-02 04:13:46 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/466

State: closed
Merged: No


…git-ai commands

Fixed an issue where the VSCode extension failed to detect git notes when VS Code was opened with a workspace root that is not a git repository (e.g., a multi-folder workspace containing multiple git repositories).

Changes:

  • Added getGitRepoRoot() method in blame-service.ts to find the actual git repository root using VS Code's Git extension API
  • Updated executeBlame() to prioritize git repo root over workspace folder
  • Added getGitRepoRoot() method in ai-edit-manager.ts with the same logic
  • Updated checkpoint() method to use git repo root for command execution

This ensures git-ai blame and checkpoint commands are executed in the correct git repository root, even when VS Code is opened with a workspace that is not a git repository.

Fixes: Git blame information not displayed in workspace mode
Fixes: Checkpoint commands failing with "not a git repository" error

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/466 **State:** closed **Merged:** No --- …git-ai commands Fixed an issue where the VSCode extension failed to detect git notes when VS Code was opened with a workspace root that is not a git repository (e.g., a multi-folder workspace containing multiple git repositories). Changes: - Added getGitRepoRoot() method in blame-service.ts to find the actual git repository root using VS Code's Git extension API - Updated executeBlame() to prioritize git repo root over workspace folder - Added getGitRepoRoot() method in ai-edit-manager.ts with the same logic - Updated checkpoint() method to use git repo root for command execution This ensures git-ai blame and checkpoint commands are executed in the correct git repository root, even when VS Code is opened with a workspace that is not a git repository. Fixes: Git blame information not displayed in workspace mode Fixes: Checkpoint commands failing with "not a git repository" error
kerem 2026-03-02 04:13:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#490
No description provided.