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

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/467

State: closed
Merged: Yes


…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

Fixes #441

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


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/467 **State:** closed **Merged:** Yes --- …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 Fixes #441 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 <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/467" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
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#488
No description provided.