Repository API: Add indicator when diffs are omitted due to size limits
Proposal
The GitLab Repository API silently excludes file diffs when files have too many changes (200+ lines), returning empty diff strings without any indication that content has been omitted. This creates a critical gap between the API and web UI experiences:
- Web UI: Shows a clear dialog warning users about excluded files due to performance limits
- API: Returns incomplete diffs with no indication that files have been excluded
This silent exclusion breaks automated workflows that depend on complete diff information:
- Approval workflows fail to detect actual code changes
- Diff comparisons between revisions appear identical when they shouldn't be
- No API mechanism exists to request the excluded diffs
- Critical file changes go unnoticed in automated processes
To address this, we are proposing adding a new response field to indicate when diffs have been omitted due to performance limits and what the diffs are. This enhancement would restore reliability to automated workflows.
Edited by 🤖 GitLab Bot 🤖