[PR #587] [MERGED] Harden internal git diff behavior against external helpers #596

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

📋 Pull Request Information

Original PR: https://github.com/git-ai-project/git-ai/pull/587
Author: @svarlamov
Created: 2/25/2026
Status: Merged
Merged: 2/26/2026
Merged by: @svarlamov

Base: mainHead: codex/standardize-internal-diff-behavior


📝 Commits (4)

  • a476e81 Harden internal git diff against external helpers
  • ac91d49 Fix external diff helper tests on Windows
  • 900baf3 Enforce standard diff backend for all internal git commands
  • fe64ac3 Use safe no-ext-diff enforcement for internal patch commands

📊 Changes

5 files changed (+559 additions, -3 deletions)

View changed files

📝 src/git/repository.rs (+146 -3)
📝 tests/continue_session.rs (+65 -0)
📝 tests/diff.rs (+225 -0)
📝 tests/stats.rs (+70 -0)
📝 tests/status_ignore.rs (+53 -0)

📄 Description

Summary

  • force internal git-ai diff invocations to bypass external diff helpers
  • keep proxied git behavior unchanged so user diff config still applies
  • add regression coverage for repo diff.external and env-based diff hooks in diff/status/stats paths

Testing

  • cargo test --test diff
  • cargo test --test status_ignore test_status_ignores_repo_external_diff_helper_for_internal_numstat -- --nocapture
  • cargo test --test stats test_stats_cli_range_ignores_repo_external_diff_helper -- --nocapture

Open with Devin

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/git-ai-project/git-ai/pull/587 **Author:** [@svarlamov](https://github.com/svarlamov) **Created:** 2/25/2026 **Status:** ✅ Merged **Merged:** 2/26/2026 **Merged by:** [@svarlamov](https://github.com/svarlamov) **Base:** `main` ← **Head:** `codex/standardize-internal-diff-behavior` --- ### 📝 Commits (4) - [`a476e81`](https://github.com/git-ai-project/git-ai/commit/a476e8199ddae6bbff1412adf87f45aec3849c70) Harden internal git diff against external helpers - [`ac91d49`](https://github.com/git-ai-project/git-ai/commit/ac91d493f7cb86d45d93d47b3bfdf7507de54c0d) Fix external diff helper tests on Windows - [`900baf3`](https://github.com/git-ai-project/git-ai/commit/900baf3f1e7bb23c657ea169678584ff117698cc) Enforce standard diff backend for all internal git commands - [`fe64ac3`](https://github.com/git-ai-project/git-ai/commit/fe64ac3f8a8e1206d7b3a3849d8c2e8b7af460ce) Use safe no-ext-diff enforcement for internal patch commands ### 📊 Changes **5 files changed** (+559 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/git/repository.rs` (+146 -3) 📝 `tests/continue_session.rs` (+65 -0) 📝 `tests/diff.rs` (+225 -0) 📝 `tests/stats.rs` (+70 -0) 📝 `tests/status_ignore.rs` (+53 -0) </details> ### 📄 Description ## Summary - force internal git-ai diff invocations to bypass external diff helpers - keep proxied git behavior unchanged so user diff config still applies - add regression coverage for repo diff.external and env-based diff hooks in diff/status/stats paths ## Testing - cargo test --test diff - cargo test --test status_ignore test_status_ignores_repo_external_diff_helper_for_internal_numstat -- --nocapture - cargo test --test stats test_stats_cli_range_ignores_repo_external_diff_helper -- --nocapture <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/587" 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 --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:14:04 +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#596
No description provided.