Skip to content

fix: disable external diff drivers in workspace patch generation#484

Merged
ischolten merged 1 commit intomainfrom
fix/no-ext-diff
Apr 15, 2026
Merged

fix: disable external diff drivers in workspace patch generation#484
ischolten merged 1 commit intomainfrom
fix/no-ext-diff

Conversation

@ischolten
Copy link
Copy Markdown
Contributor

@ischolten ischolten commented Apr 15, 2026

Summary

Workspace patches generated by depot ci run could silently contain non-diff content when a user has an external diff driver configured, causing all local actions to be invisible at compile and runtime.

What was happening

git diff --binary does not disable external diff drivers (GIT_EXTERNAL_DIFF env var or diff.external in gitconfig). If a user has one configured (e.g. difft, delta, or a custom viewer), the diff output is in whatever format that tool produces instead of unified diff. This non-diff content gets uploaded to the cache, and then git apply --allow-empty silently succeeds with zero hunks applied — so .depot/ files are never materialized on disk.

What happens now

Added --no-ext-diff to the git diff command in detectPatch(), which forces git's internal diff engine regardless of user configuration.

Released CLI Patched CLI
GIT_EXTERNAL_DIFF set 549 bytes (rendered, not a diff) 820 bytes (valid unified diff)
Job result FAILEDaction manifest not found PASSED

Made with Cursor


Note

Low Risk
Single flag change to patch generation; low blast radius and primarily improves determinism of git diff output.

Overview
Fixes workspace patch generation for depot ci run by forcing Git’s built-in diff output: detectPatch() now runs git diff --binary --no-ext-diff so user-configured external diff drivers can’t replace the unified diff content that gets uploaded/applied.

Reviewed by Cursor Bugbot for commit a55ff39. Bugbot is set up for automated code reviews on this repo. Configure here.

git diff --binary does not disable external diff drivers. If a user
has GIT_EXTERNAL_DIFF or diff.external configured, the patch output
is in a non-unified-diff format that git apply silently accepts
(with --allow-empty) but applies zero hunks.

Adding --no-ext-diff forces git's internal diff engine regardless
of user configuration.

Made-with: Cursor
@ischolten ischolten merged commit f9650a5 into main Apr 15, 2026
11 checks passed
@ischolten ischolten deleted the fix/no-ext-diff branch April 15, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants