[PR #557] install-hooks: configure vscode/cursor git.path on all OSes #566

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

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

State: closed
Merged: Yes


Summary

  • enable git.path configuration for VSCodeInstaller on all platforms (remove Windows-only gate)
  • enable git.path configuration for CursorInstaller on all platforms (remove Windows-only gate)
  • make git_shim_path_string() cross-platform in mdm::utils
  • keep Windsurf out of scope for this PR

Why

Some users (especially on macOS) who commit through Cursor/VS Code UI still need manual git.path setup after install. install-hooks should handle this consistently across OSes.

Changes

  • src/mdm/agents/vscode.rs
    • removed #[cfg(windows)] around git.path update logic in install_extras
  • src/mdm/agents/cursor.rs
    • removed #[cfg(windows)] around git.path update logic in install_extras
  • src/mdm/utils.rs
    • removed Windows-only gating from git_shim_path_string()
    • removed obsolete dead-code attribute from update_git_path_setting

Tests

Added serial unit tests to verify idempotent git.path updates and no duplicates:

  • mdm::agents::vscode::tests::test_vscode_install_extras_configures_git_path_idempotently
  • mdm::agents::cursor::tests::test_cursor_install_extras_configures_git_path_idempotently

Ran locally:

  • cargo test update_git_path_setting -- --nocapture
  • cargo test install_extras_configures_git_path_idempotently -- --nocapture
  • cargo clippy
  • cargo fmt -- --check

cargo test currently fails on unrelated existing tests in tests/ai_tab.rs:

  • test_ai_tab_e2e_marks_ai_lines
  • test_ai_tab_e2e_handles_dirty_files_map

No Windsurf support added in this PR by design.


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/557 **State:** closed **Merged:** Yes --- ## Summary - enable `git.path` configuration for `VSCodeInstaller` on all platforms (remove Windows-only gate) - enable `git.path` configuration for `CursorInstaller` on all platforms (remove Windows-only gate) - make `git_shim_path_string()` cross-platform in `mdm::utils` - keep Windsurf out of scope for this PR ## Why Some users (especially on macOS) who commit through Cursor/VS Code UI still need manual `git.path` setup after install. `install-hooks` should handle this consistently across OSes. ## Changes - `src/mdm/agents/vscode.rs` - removed `#[cfg(windows)]` around `git.path` update logic in `install_extras` - `src/mdm/agents/cursor.rs` - removed `#[cfg(windows)]` around `git.path` update logic in `install_extras` - `src/mdm/utils.rs` - removed Windows-only gating from `git_shim_path_string()` - removed obsolete dead-code attribute from `update_git_path_setting` ## Tests Added serial unit tests to verify idempotent `git.path` updates and no duplicates: - `mdm::agents::vscode::tests::test_vscode_install_extras_configures_git_path_idempotently` - `mdm::agents::cursor::tests::test_cursor_install_extras_configures_git_path_idempotently` Ran locally: - `cargo test update_git_path_setting -- --nocapture` ✅ - `cargo test install_extras_configures_git_path_idempotently -- --nocapture` ✅ - `cargo clippy` ✅ - `cargo fmt -- --check` ✅ `cargo test` currently fails on unrelated existing tests in `tests/ai_tab.rs`: - `test_ai_tab_e2e_marks_ai_lines` - `test_ai_tab_e2e_handles_dirty_files_map` No Windsurf support added in this PR by design. <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/557" 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:59 +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#566
No description provided.